class ImageSprite

Inherits: Sprite

A sprite consisting of a single image represented by a sprite texture.

Public

Constructors

ImageSprite

ImageSprite() = default

Methods

~ImageSprite

~ImageSprite() noexcept

Update

void Update(const ImageSpriteInformation &information, u64 groupId)

Recreates internal sprite data according the specified description structure.

information
Describes the geometry and material of the sprite.
groupId
Group identifier that forces different materials to be used for different groups (for example you don't want the sprites to share the same material if they use different world transform matrices).

staticGetTextureUvScale

static Vector2 GetTextureUvScale(Size2I sourceSize, Size2I destinationSize, TextureScaleMode scaleMode)

Calculates the required UV scale in order for a texture of size to be placed on the surface of size, while respecting the chosen scale mode.

Private

Methods

ClearMesh

void ClearMesh()

Clears internal geometry buffers.

Fields

mSpriteImageAllocations

SPtr<SpriteImageAllocation> mSpriteImageAllocations