Torque2D Reference
|
#include <ImageFrameProviderCore.h>
Public Member Functions | |
ImageFrameProviderCore () | |
virtual | ~ImageFrameProviderCore () |
void | allocateAssets (AssetPtr< ImageAsset > *pImageAssetPtr, AssetPtr< AnimationAsset > *pAnimationAssetPtr) |
void | deallocateAssets (void) |
virtual void | copyTo (ImageFrameProviderCore *pImageFrameProviderCore) const |
virtual bool | update (const F32 elapsedTime) |
Integration. More... | |
virtual void | processTick () |
virtual void | interpolateTick (F32 delta) |
virtual void | advanceTime (F32 timeDelta) |
virtual void | setProcessTicks (bool tick) |
bool | updateAnimation (const F32 elapsedTime) |
virtual bool | validRender (void) const |
virtual void | render (const bool flipX, const bool flipY, const Vector2 &vertexPos0, const Vector2 &vertexPos1, const Vector2 &vertexPos2, const Vector2 &vertexPos3, BatchRender *pBatchRenderer) const |
void | renderGui (GuiControl &owner, Point2I offset, const RectI &updateRect) const |
bool | setImage (const char *pImageAssetId) |
Static-Image Frame. More... | |
virtual bool | setImage (const char *pImageAssetId, const U32 frame) |
StringTableEntry | getImage (void) const |
virtual bool | setImageFrame (const U32 frame) |
U32 | getImageFrame (void) const |
virtual bool | setAnimation (const char *pAnimationAssetId) |
Animated-Image Frame. More... | |
StringTableEntry | getAnimation (void) const |
void | setAnimationFrame (const U32 frameIndex) |
void | setAnimationTimeScale (const F32 scale) |
F32 | getAnimationTimeScale (void) const |
bool | playAnimation (const AssetPtr< AnimationAsset > &animationAsset) |
void | pauseAnimation (const bool animationPaused) |
void | stopAnimation (void) |
void | resetAnimationTime (void) |
bool | isAnimationPaused (void) const |
bool | isAnimationFinished (void) const |
bool | isAnimationValid (void) const |
bool | isStaticFrameProvider (void) const |
Frame provision. More... | |
TextureHandle & | getProviderTexture (void) const |
const ImageAsset::FrameArea & | getProviderImageFrameArea (void) const |
const AnimationAsset * | getCurrentAnimation (void) const |
const StringTableEntry | getCurrentAnimationAssetId (void) const |
const U32 | getCurrentAnimationFrame (void) const |
const F32 | getCurrentAnimationTime (void) const |
void | clearAssets (void) |
virtual void | resetState (void) |
![]() | |
Tickable () | |
virtual | ~Tickable () |
virtual bool | isProcessingTicks () const |
Protected Member Functions | |
virtual void | onAnimationEnd (void) |
virtual void | onAssetRefreshed (AssetPtrBase *pAssetPtrBase) |
Protected Attributes | |
bool | mSelfTick |
bool | mStaticProvider |
U32 | mImageFrame |
AssetPtr< ImageAsset > * | mpImageAsset |
AssetPtr< AnimationAsset > * | mpAnimationAsset |
S32 | mLastFrameIndex |
S32 | mCurrentFrameIndex |
U32 | mMaxFrameIndex |
F32 | mCurrentTime |
F32 | mPausedTime |
F32 | mCurrentModTime |
F32 | mAnimationTimeScale |
F32 | mTotalIntegrationTime |
F32 | mFrameIntegrationTime |
bool | mAnimationPaused |
bool | mAnimationFinished |
Additional Inherited Members | |
![]() | |
static bool | advanceTime (U32 timeDelta) |
![]() | |
static const U32 | smTickShift = 4 |
Shift value to control how often Ticks occur. More... | |
static const U32 | smTickMs = ( 1 << smTickShift ) |
Number of milliseconds per tick, 32 in this case. More... | |
static const F32 | smTickSec = ( F32( Tickable::smTickMs ) / 1000.f ) |
Fraction of a second per tick. More... | |
static const U32 | smTickMask = ( smTickMs - 1 ) |
|
virtual |
|
inlinevirtual |
This method is called once every frame regardless of the return value of isProcessingTicks and informs the object of the passage of time
Implements Tickable.
void allocateAssets | ( | AssetPtr< ImageAsset > * | pImageAssetPtr, |
AssetPtr< AnimationAsset > * | pAnimationAssetPtr | ||
) |
void clearAssets | ( | void | ) |
|
virtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
const U32 getCurrentAnimationFrame | ( | void | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
This method is called every frame and lets the control interpolate between ticks so you can smooth things as long as isProcessingTicks returns true when it is called on the object
Implements Tickable.
|
inline |
|
inline |
bool isAnimationValid | ( | void | ) | const |
|
inline |
Frame provision.
|
inlineprotectedvirtual |
Reimplemented in GuiSpriteCtrl, and SpriteBase.
|
protectedvirtual |
Implements AssetPtrCallback.
Reimplemented in ImageFrameProvider.
|
inline |
bool playAnimation | ( | const AssetPtr< AnimationAsset > & | animationAsset | ) |
|
virtual |
This method is called once every 32ms if isProcessingTicks returns true when called on the object
Implements Tickable.
|
virtual |
void renderGui | ( | GuiControl & | owner, |
Point2I | offset, | ||
const RectI & | updateRect | ||
) | const |
|
inline |
|
virtual |
Implements IFactoryObjectReset.
Reimplemented in SpriteBatchItem.
|
virtual |
Animated-Image Frame.
Reimplemented in GuiSpriteCtrl.
void setAnimationFrame | ( | const U32 | frameIndex | ) |
|
inline |
|
inline |
Static-Image Frame.
|
virtual |
|
virtual |
Reimplemented in GuiSpriteCtrl.
|
inlinevirtual |
Sets this object as either tick processing or not
tick | True if this object should process ticks |
Reimplemented from Tickable.
|
inline |
|
virtual |
Integration.
bool updateAnimation | ( | const F32 | elapsedTime | ) |
|
virtual |
Reimplemented in SpriteBase.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |