SpriteUV Class Reference

SpriteUV is a sprite for which you set uvs manually. More...

Inheritance diagram for SpriteUV:
SpriteBase Node

List of all members.

Public Member Functions

 SpriteUV ()
 SpriteUV constructor.
 SpriteUV (TextureInfo texture_info)
 SpriteUV constructor.
override Vector2 CalcSizeInPixels ()
 Based on the uv and texture dimensions, return the corresponding size in pixels.

Public Attributes

TRS UV = TRS.Quad0_1
 The UV is specified as a TRS, which lets you define any oriented rectangle in the UV domain.

Detailed Description

SpriteUV is a sprite for which you set uvs manually.

Uvs are stored as a TRS object. Note that the cost of using SpriteUV alone is heavy, try as much as you can to use then as children of SpriteList.


Member Function Documentation

override Vector2 CalcSizeInPixels ( ) [virtual]

Based on the uv and texture dimensions, return the corresponding size in pixels.

For example you might want to do something like bob.Quad.S = bob.CalcSizeInPixels(). If the uv is Quad0_1 (the 0,1 unit quad), then this will return thr texture size in pixels.

Implements SpriteBase.