C# Класс Fusion.Engine.Graphics.SpriteLayer

Наследование: System.DisposableBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
Draw ( GameTime gameTime, StereoEye stereoEye ) : void

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

Draws arbitrary quad with specified vertices.

Описание методов

Clear() публичный Метод

Clears all sprites.
public Clear ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

public Draw ( Texture texture, Rectangle dstRect, Rectangle srcRect, Color color, int clipRectIndex ) : void
texture Texture
dstRect Rectangle
srcRect Rectangle
color Color
clipRectIndex int
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

Draw() публичный Метод

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
Результат void

DrawBeam() публичный Метод

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
Результат void

DrawDebugString() публичный Метод

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
Результат void

DrawDebugString() публичный Метод

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
Результат void

DrawSprite() публичный Метод

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
Результат void

DrawSprite() публичный Метод

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
Результат void

DrawUV() публичный Метод

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
Результат void

DrawUV() публичный Метод

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
Результат void

PushQuad() публичный Метод

public PushQuad ( Texture texture, SpriteVertex v0, SpriteVertex v1, SpriteVertex v2, SpriteVertex v3 ) : void
texture Texture
v0 SpriteVertex
v1 SpriteVertex
v2 SpriteVertex
v3 SpriteVertex
Результат void

ReallocGpuBuffers() публичный Метод

public ReallocGpuBuffers ( int newCapacity ) : void
newCapacity int
Результат void

SetClipRectangle() публичный Метод

public SetClipRectangle ( int index, Rectangle rectangle, Color color ) : void
index int
rectangle Rectangle
color Color
Результат void

SetTransform() публичный Метод

public SetTransform ( Vector2 offset, Vector2 pivot, float angle ) : void
offset Vector2
pivot Vector2
angle float
Результат void

SetTransform() публичный Метод

public SetTransform ( float x, float y ) : void
x float
y float
Результат void

SpriteLayer() публичный Метод

Ctor
public SpriteLayer ( RenderSystem rs, int capacity ) : System
rs RenderSystem
capacity int Number of sprites
Результат System