Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SpriteBatchItem Class Reference

`#include <SpriteBatchItem.h>`

Inheritance diagram for SpriteBatchItem:

## Classes
struct | LogicalPosition

## Public Member Functions
| SpriteBatchItem ()
virtual | ~SpriteBatchItem ()
virtual void | resetState (void)
SpriteBatch * | getBatchParent (void) const
U32 | getBatchId (void) const
S32 | getProxyId (void) const
StringTableEntry | getName (void) const
void | setLogicalPosition (const LogicalPosition &logicalPosition)
const LogicalPosition & | getLogicalPosition (void) const
void | setVisible (const bool visible)
bool | getVisible (void) const
void | setExplicitMode (const bool explicitMode)
bool | getExplicitMode (void) const
void | setLocalPosition (const Vector2 &localPosition)
Vector2 | getLocalPosition (void) const
void | setExplicitVertices (const Vector2 *explicitVertices)
void | setLocalAngle (const F32 localAngle)
F32 | getLocalAngle (void) const
void | setSize (const Vector2 &size)
Vector2 | getSize (void) const
const b2AABB & | getLocalAABB (void)
void | setDepth (const F32 depth)
F32 | getDepth (void) const
void | setFlipX (const bool flipX)
bool | getFlipX (void) const
void | setFlipY (const bool flipY)
bool | getFlipY (void) const
void | setSortPoint (const Vector2 &sortPoint)
Vector2 | getSortPoint (void) const
void | setRenderGroup (const char *pRenderGroup)
StringTableEntry | getRenderGroup (void) const
void | setBlendMode (const bool blendMode)
bool | getBlendMode (void) const
void | setSrcBlendFactor (GLenum srcBlendFactor)
GLenum | getSrcBlendFactor (void) const
void | setDstBlendFactor (GLenum dstBlendFactor)
GLenum | getDstBlendFactor (void) const
void | setBlendColor (const ColorF &blendColor)
const ColorF & | getBlendColor (void) const
void | setBlendAlpha (const F32 alpha)
F32 | getBlendAlpha (void) const
void | setAlphaTest (const F32 alphaTest)
F32 | getAlphaTest (void) const
void | setDataObject (SimObject *pDataObject)
SimObject * | getDataObject (void) const
void | setUserData (void *pUserData)
void * | getUserData (void) const
template<class T >
T * | getUserData (void) const
void | setSpriteBatchQueryKey (const U32 key)
U32 | getSpriteBatchQueryKey (void) const
virtual void | copyTo (SpriteBatchItem *pSpriteBatchItem) const
const Vector2 * | getLocalOOBB (void) const
const Vector2 * | getRenderOOBB (void) const
void | prepareRender (SceneRenderRequest *pSceneRenderRequest, const U32 batchTransformId)
void | render (BatchRender *pBatchRenderer, const SceneRenderRequest *pSceneRenderRequest, const U32 batchTransformId)
Public Member Functions inherited from ImageFrameProvider
| ImageFrameProvider ()
virtual | ~ImageFrameProvider ()
Public Member Functions inherited from ImageFrameProviderCore
| 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)
virtual bool | setImage (const char *pImageAssetId, const char *pNamedFrame)
StringTableEntry | getImage (void) const
virtual bool | setImageFrame (const U32 frame)
U32 | getImageFrame (void) const
virtual bool | setNamedImageFrame (const char *frame)
StringTableEntry | getNamedImageFrame (void) const
virtual bool | setAnimation (const char *pAnimationAssetId)
| Animated-Image Frame. More...
StringTableEntry | getAnimation (void) const
void | setAnimationFrame (const U32 frameIndex)
S32 | getAnimationFrame (void) const
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...
bool | isUsingNamedImageFrame (void) const
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 char * | getCurrentNamedAnimationFrame (void) const
const F32 | getCurrentAnimationTime (void) const
void | clearAssets (void)
Public Member Functions inherited from Tickable
| Tickable ()
virtual | ~Tickable ()
virtual bool | isProcessingTicks () const

## Static Public Member Functions
static void | WriteCustomTamlSchema (const AbstractClassRep *pClassRep, TiXmlElement *pParentElement)
Static Public Member Functions inherited from Tickable
static bool | advanceTime (U32 timeDelta)

## Protected Member Functions
void | setBatchParent (SpriteBatch *pSpriteBatch, const U32 batchId)
void | setProxyId (const S32 proxyId)
void | setName (const char *pName)
void | updateLocalTransform (void)
void | updateWorldTransform (const U32 batchTransformId)
void | onTamlCustomWrite (TamlCustomNode *pParentNode)
void | onTamlCustomRead (const TamlCustomNode *pSpriteNode)
Protected Member Functions inherited from ImageFrameProvider
virtual void | onAssetRefreshed (AssetPtrBase *pAssetPtrBase)
Protected Member Functions inherited from ImageFrameProviderCore
virtual void | onAnimationEnd (void)

## Protected Attributes
SpriteBatch * | mSpriteBatch
U32 | mBatchId
S32 | mProxyId
StringTableEntry | mName
LogicalPosition | mLogicalPosition
bool | mVisible
bool | mExplicitMode
Vector2 | mLocalPosition
Vector2 | mExplicitVerts [4]
F32 | mLocalAngle
Vector2 | mSize
F32 | mDepth
bool | mFlipX
bool | mFlipY
Vector2 | mSortPoint
StringTableEntry | mRenderGroup
bool | mBlendMode
GLenum | mSrcBlendFactor
GLenum | mDstBlendFactor
ColorF | mBlendColor
F32 | mAlphaTest
SimObjectPtr< SimObject > | mDataObject
Vector2 | mLocalOOBB [4]
b2AABB | mLocalAABB
bool | mLocalTransformDirty
Vector2 | mRenderOOBB [4]
b2AABB | mRenderAABB
Vector2 | mRenderPosition
U32 | mLastBatchTransformId
U32 | mSpriteBatchQueryKey
void * | mUserData
Protected Attributes inherited from ImageFrameProvider
AssetPtr< ImageAsset > | mImageAsset
AssetPtr< AnimationAsset > | mAnimationAsset
Protected Attributes inherited from ImageFrameProviderCore
bool | mSelfTick
bool | mStaticProvider
bool | mUsingNamedFrame
U32 | mImageFrame
StringTableEntry | mNamedImageFrame
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

## Friends
class | SpriteBatch

## Additional Inherited Members
Static Public Attributes inherited from Tickable
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 )

## Constructor & Destructor Documentation

SpriteBatchItem | ( |  | ) |

~SpriteBatchItem | ( |  | ) |
| virtual

## Member Function Documentation

void copyTo | ( | SpriteBatchItem * | pSpriteBatchItem | ) | const
| virtual

F32 getAlphaTest | ( | void |  | ) | const
| inline

U32 getBatchId | ( | void |  | ) | const
| inline

SpriteBatch* getBatchParent | ( | void |  | ) | const
| inline

F32 getBlendAlpha | ( | void |  | ) | const
| inline

const ColorF& getBlendColor | ( | void |  | ) | const
| inline

bool getBlendMode | ( | void |  | ) | const
| inline

SimObject* getDataObject | ( | void |  | ) | const
| inline

F32 getDepth | ( | void |  | ) | const
| inline

GLenum getDstBlendFactor | ( | void |  | ) | const
| inline

bool getExplicitMode | ( | void |  | ) | const
| inline

bool getFlipX | ( | void |  | ) | const
| inline

bool getFlipY | ( | void |  | ) | const
| inline

const b2AABB& getLocalAABB | ( | void |  | ) |
| inline

F32 getLocalAngle | ( | void |  | ) | const
| inline

const Vector2* getLocalOOBB | ( | void |  | ) | const
| inline

Vector2 getLocalPosition | ( | void |  | ) | const
| inline

const LogicalPosition& getLogicalPosition | ( | void |  | ) | const
| inline

StringTableEntry getName | ( | void |  | ) | const
| inline

S32 getProxyId | ( | void |  | ) | const
| inline

StringTableEntry getRenderGroup | ( | void |  | ) | const
| inline

const Vector2* getRenderOOBB | ( | void |  | ) | const
| inline

Vector2 getSize | ( | void |  | ) | const
| inline

Vector2 getSortPoint | ( | void |  | ) | const
| inline

U32 getSpriteBatchQueryKey | ( | void |  | ) | const
| inline

GLenum getSrcBlendFactor | ( | void |  | ) | const
| inline

void* getUserData | ( | void |  | ) | const
| inline

T* getUserData | ( | void |  | ) | const
| inline

bool getVisible | ( | void |  | ) | const
| inline

void onTamlCustomRead | ( | const TamlCustomNode * | pSpriteNode | ) |
| protected

void onTamlCustomWrite | ( | TamlCustomNode * | pParentNode | ) |
| protected

void prepareRender | ( | SceneRenderRequest * | pSceneRenderRequest,
|  | const U32 | batchTransformId
| ) |  |

void render | ( | BatchRender * | pBatchRenderer,
|  | const SceneRenderRequest * | pSceneRenderRequest,
|  | const U32 | batchTransformId
| ) |  |

void resetState | ( | void |  | ) |
| virtual

Reimplemented from ImageFrameProviderCore.

void setAlphaTest | ( | const F32 | alphaTest | ) |
| inline

void setBatchParent | ( | SpriteBatch * | pSpriteBatch,
|  | const U32 | batchId
| ) |  |
| protected

void setBlendAlpha | ( | const F32 | alpha | ) |
| inline

void setBlendColor | ( | const ColorF & | blendColor | ) |
| inline

void setBlendMode | ( | const bool | blendMode | ) |
| inline

void setDataObject | ( | SimObject * | pDataObject | ) |
| inline

void setDepth | ( | const F32 | depth | ) |
| inline

void setDstBlendFactor | ( | GLenum | dstBlendFactor | ) |
| inline

void setExplicitMode | ( | const bool | explicitMode | ) |
| inline

void setExplicitVertices | ( | const Vector2 * | explicitVertices | ) |

void setFlipX | ( | const bool | flipX | ) |
| inline

void setFlipY | ( | const bool | flipY | ) |
| inline

void setLocalAngle | ( | const F32 | localAngle | ) |
| inline

void setLocalPosition | ( | const Vector2 & | localPosition | ) |
| inline

void setLogicalPosition | ( | const LogicalPosition & | logicalPosition | ) |
| inline

void setName | ( | const char * | pName | ) |
| inline protected

void setProxyId | ( | const S32 | proxyId | ) |
| inline protected

void setRenderGroup | ( | const char * | pRenderGroup | ) |
| inline

void setSize | ( | const Vector2 & | size | ) |
| inline

void setSortPoint | ( | const Vector2 & | sortPoint | ) |
| inline

void setSpriteBatchQueryKey | ( | const U32 | key | ) |
| inline

void setSrcBlendFactor | ( | GLenum | srcBlendFactor | ) |
| inline

void setUserData | ( | void * | pUserData | ) |
| inline

void setVisible | ( | const bool | visible | ) |
| inline

void updateLocalTransform | ( | void |  | ) |
| protected

void updateWorldTransform | ( | const U32 | batchTransformId | ) |
| protected

void WriteCustomTamlSchema | ( | const AbstractClassRep * | pClassRep,
|  | TiXmlElement * | pParentElement
| ) |  |
| static

## Friends And Related Function Documentation

friend class SpriteBatch
| friend

## Member Data Documentation

F32 mAlphaTest
| protected

U32 mBatchId
| protected

ColorF mBlendColor
| protected

bool mBlendMode
| protected

SimObjectPtr<SimObject> mDataObject
| protected

F32 mDepth
| protected

GLenum mDstBlendFactor
| protected

bool mExplicitMode
| protected

Vector2 mExplicitVerts[4]
| protected

bool mFlipX
| protected

bool mFlipY
| protected

U32 mLastBatchTransformId
| protected

b2AABB mLocalAABB
| protected

F32 mLocalAngle
| protected

Vector2 mLocalOOBB[4]
| protected

Vector2 mLocalPosition
| protected

bool mLocalTransformDirty
| protected

LogicalPosition mLogicalPosition
| protected

StringTableEntry mName
| protected

S32 mProxyId
| protected

b2AABB mRenderAABB
| protected

StringTableEntry mRenderGroup
| protected

Vector2 mRenderOOBB[4]
| protected

Vector2 mRenderPosition
| protected

Vector2 mSize
| protected

Vector2 mSortPoint
| protected

SpriteBatch* mSpriteBatch
| protected

U32 mSpriteBatchQueryKey
| protected

GLenum mSrcBlendFactor
| protected

void* mUserData
| protected

bool mVisible
| protected

The documentation for this class was generated from the following files:

- 2d/core/SpriteBatchItem.h
- 2d/core/SpriteBatchItem.cc