C# Class Fusion.Engine.Graphics.SpriteLayer

Inheritance: System.DisposableBase
Afficher le fichier Open project: demiurghg/FusionEngine Class Usage Examples

Méthodes publiques

Méthode Description
Clear ( ) : void

Clears all sprites.

Draw ( Texture texture, Rectangle dstRect, Color color, int clipRectIndex ) : void

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, and color.

Draw ( Texture texture, Rectangle dstRect, Rectangle srcRect, Color color, int clipRectIndex ) : void

Draw ( Texture texture, Rectangle dstRect, Rectangle srcRect, int offsetX, int offsetY, Color color, int clipRectIndex ) : void

Draw ( Texture texture, RectangleF dstRect, Color color, int clipRectIndex ) : void

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, and color.

Draw ( Texture texture, RectangleF dstRect, RectangleF srcRect, Color color, int clipRectIndex ) : void

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, source rectangle, and color.

Draw ( Texture srv, float x, float y, float w, float h, Color color, int clipRectIndex ) : void

Draw axis-aligned quad with stretched texture.

DrawBeam ( Texture srv, Vector2 p0, Vector2 p1, Color color0, Color color1, float width, float scale = 1, float offset, int clipRectIndex ) : void

Draws beam.

DrawDebugString ( Texture fontTexture, float x, float y, string text, Color color, float scale, int clipRectIndex ) : void

Draw string using specified font texture, position, text and color. Font texture should contain character glyphs arranged in grid 16x16. Only ASCII is supported.

DrawDebugString ( Texture fontTexture, float x, float y, string text, Color color, int clipRectIndex ) : void

Draw string using specified font texture, position, text and color. Font texture should contain character glyphs arranged in grid 16x16. Only ASCII is supported.

DrawSprite ( Texture srv, float x, float y, float size, float angle, Color color, int clipRectIndex ) : void

Draw rotated square with specified position, width, height and rotation angle.

DrawSprite ( Texture srv, float x, float y, float width, float height, float angle, Color color, int clipRectIndex ) : void

Draw rotated rectangle with specified position, width, height and rotation angle.

DrawUV ( Texture srv, Vector3 leftTopCorner, Vector3 rightBottomCorner, Color color, float u, float v, float tw, float th, int clipRectIndex ) : void

DrawUV ( Texture srv, float x, float y, float w, float h, Color color, float u, float v, float tw, float th, int clipRectIndex ) : void

Draw axis-aligned quad with specified UV coordinates.

PushQuad ( Texture texture, SpriteVertex v0, SpriteVertex v1, SpriteVertex v2, SpriteVertex v3 ) : void

ReallocGpuBuffers ( int newCapacity ) : void

SetClipRectangle ( int index, Rectangle rectangle, Color color ) : void

SetTransform ( Vector2 offset, Vector2 pivot, float angle ) : void

SetTransform ( float x, float y ) : void

SpriteLayer ( RenderSystem rs, int capacity ) : System

Ctor

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
Draw ( GameTime gameTime, StereoEye stereoEye ) : void

DrawQuad ( Texture texture, SpriteVertex v0, SpriteVertex v1, SpriteVertex v2, SpriteVertex v3 ) : void

Draws arbitrary quad with specified vertices.

Method Details

Clear() public méthode

Clears all sprites.
public Clear ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Draw() public méthode

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, and color.
public Draw ( Texture texture, Rectangle dstRect, Color color, int clipRectIndex ) : void
texture Texture
dstRect Rectangle
color Color
clipRectIndex int
Résultat void

Draw() public méthode

public Draw ( Texture texture, Rectangle dstRect, Rectangle srcRect, Color color, int clipRectIndex ) : void
texture Texture
dstRect Rectangle
srcRect Rectangle
color Color
clipRectIndex int
Résultat void

Draw() public méthode

public Draw ( Texture texture, Rectangle dstRect, Rectangle srcRect, int offsetX, int offsetY, Color color, int clipRectIndex ) : void
texture Texture
dstRect Rectangle
srcRect Rectangle
offsetX int
offsetY int
color Color
clipRectIndex int
Résultat void

Draw() public méthode

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, and color.
public Draw ( Texture texture, RectangleF dstRect, Color color, int clipRectIndex ) : void
texture Texture
dstRect RectangleF
color Color
clipRectIndex int
Résultat void

Draw() public méthode

Adds a sprite to a batch of sprites for rendering using the specified texture, destination rectangle, source rectangle, and color.
public Draw ( Texture texture, RectangleF dstRect, RectangleF srcRect, Color color, int clipRectIndex ) : void
texture Texture
dstRect RectangleF
srcRect RectangleF
color Color
clipRectIndex int
Résultat void

Draw() public méthode

Draw axis-aligned quad with stretched texture.
public Draw ( Texture srv, float x, float y, float w, float h, Color color, int clipRectIndex ) : void
srv Texture
x float
y float
w float
h float
color Color
clipRectIndex int
Résultat void

DrawBeam() public méthode

Draws beam.
public DrawBeam ( Texture srv, Vector2 p0, Vector2 p1, Color color0, Color color1, float width, float scale = 1, float offset, int clipRectIndex ) : void
srv Texture
p0 Vector2
p1 Vector2
color0 Color
color1 Color
width float
scale float
offset float
clipRectIndex int
Résultat void

DrawDebugString() public méthode

Draw string using specified font texture, position, text and color. Font texture should contain character glyphs arranged in grid 16x16. Only ASCII is supported.
public DrawDebugString ( Texture fontTexture, float x, float y, string text, Color color, float scale, int clipRectIndex ) : void
fontTexture Texture
x float
y float
text string
color Color
scale float
clipRectIndex int
Résultat void

DrawDebugString() public méthode

Draw string using specified font texture, position, text and color. Font texture should contain character glyphs arranged in grid 16x16. Only ASCII is supported.
public DrawDebugString ( Texture fontTexture, float x, float y, string text, Color color, int clipRectIndex ) : void
fontTexture Texture
x float
y float
text string
color Color
clipRectIndex int
Résultat void

DrawSprite() public méthode

Draw rotated square with specified position, width, height and rotation angle.
public DrawSprite ( Texture srv, float x, float y, float size, float angle, Color color, int clipRectIndex ) : void
srv Texture
x float
y float
size float
angle float
color Color
clipRectIndex int
Résultat void

DrawSprite() public méthode

Draw rotated rectangle with specified position, width, height and rotation angle.
public DrawSprite ( Texture srv, float x, float y, float width, float height, float angle, Color color, int clipRectIndex ) : void
srv Texture
x float
y float
width float
height float
angle float
color Color
clipRectIndex int
Résultat void

DrawUV() public méthode

public DrawUV ( Texture srv, Vector3 leftTopCorner, Vector3 rightBottomCorner, Color color, float u, float v, float tw, float th, int clipRectIndex ) : void
srv Texture
leftTopCorner Vector3
rightBottomCorner Vector3
color Color
u float
v float
tw float
th float
clipRectIndex int
Résultat void

DrawUV() public méthode

Draw axis-aligned quad with specified UV coordinates.
public DrawUV ( Texture srv, float x, float y, float w, float h, Color color, float u, float v, float tw, float th, int clipRectIndex ) : void
srv Texture
x float
y float
w float
h float
color Color
u float
v float
tw float
th float
clipRectIndex int
Résultat void

PushQuad() public méthode

public PushQuad ( Texture texture, SpriteVertex v0, SpriteVertex v1, SpriteVertex v2, SpriteVertex v3 ) : void
texture Texture
v0 SpriteVertex
v1 SpriteVertex
v2 SpriteVertex
v3 SpriteVertex
Résultat void

ReallocGpuBuffers() public méthode

public ReallocGpuBuffers ( int newCapacity ) : void
newCapacity int
Résultat void

SetClipRectangle() public méthode

public SetClipRectangle ( int index, Rectangle rectangle, Color color ) : void
index int
rectangle Rectangle
color Color
Résultat void

SetTransform() public méthode

public SetTransform ( Vector2 offset, Vector2 pivot, float angle ) : void
offset Vector2
pivot Vector2
angle float
Résultat void

SetTransform() public méthode

public SetTransform ( float x, float y ) : void
x float
y float
Résultat void

SpriteLayer() public méthode

Ctor
public SpriteLayer ( RenderSystem rs, int capacity ) : System
rs RenderSystem
capacity int Number of sprites
Résultat System