class
SpriteImageAllocation
Public
Methods
~SpriteImageAllocation
virtual ~SpriteImageAllocation() noexcept
staticCreate
static SPtr<SpriteImageAllocation> Create(const WeakSPtr<SpriteImage> &owner, const HTexture &atlasTexture, const Area2 &uvRange)
Creates a new sprite image allocation.
~TSpriteImageAllocation<IsRenderProxy>
virtual ~TSpriteImageAllocation<IsRenderProxy>() = default
GetSize
Size2I GetSize() const
Returns the pixel size of the UV subrange covered in the texture atlas.
If the image includes animation, this will return the size of the entire animation grid.
TransformUV
Vector2 TransformUV(const Vector2 &uv) const
Transforms local UV coordinates into atlas UV coordinates.
Protected
Methods
CreateRenderProxy
Creates an object that contains render thread specific data and methods for this object.
Can be null if such object is not required.
CreateRenderProxySyncPacket
Creates a data packet that will be used for syncing the core object with it's render proxy.
Caller must free the retrieved packet using the provided allocator when done using it.
Fields
mOwner
WeakSPtr<SpriteImageType> mOwner
Owner sprite image that this allocation is a part of.