class
TSpriteImage
template<bool IsRenderProxy>
Inherits:
SpriteImageBase
Templated base class for both render and main thread counterparts of SpriteImage.
Public
Constructors
TSpriteImage<IsRenderProxy>
TSpriteImage<IsRenderProxy>(const SpriteImageCreateInformation &createInformation, const SPtr<SpriteImageAllocationType> &defaultAllocatedImage = nullptr)
Methods
~TSpriteImage<IsRenderProxy>
~TSpriteImage<IsRenderProxy>() override = default
EvaluateAnimation
Evaluates the UV coordinate offset and size to use at the specified animation time.
If the sprite texture doesn't have animation playback enabled then just the default offset and size will be provided, otherwise the animation will be evaluated and appropriate UV returned.
- allocation
- Image allocation to evaluate animation for. Must be owned by this sprite image.
- t
- Time to evaluate the animation at.
Returns: UV range of the animation frame at the specified time.
GetDefaultAllocatedImage
const SpriteImageAllocationType &GetDefaultAllocatedImage() const
Returns the default (unscaled) image allocation, using the image size as provided on the sprite image construction.
GetAnimationFrameSize
Size2UI GetAnimationFrameSize() const
Returns the size of a single animation frame in logical pixel units.
If the texture has no animation this is the same as GetLogicalSize().
Protected
Fields
mDefaultAllocatedImage
SPtr<SpriteImageAllocationType> mDefaultAllocatedImage
mScaledAllocatedImages
TInlineArray<SpriteImageAllocationType *, 2> mScaledAllocatedImages