Torque2D Reference
|
#include <SpriteBatch.h>
Public Member Functions | |
SpriteBatch () | |
virtual | ~SpriteBatch () |
virtual bool | onAdd () |
virtual void | onRemove () |
void | prepareRender (SceneRenderObject *pSceneRenderObject, const SceneRenderState *pSceneRenderState, SceneRenderQueue *pSceneRenderQueue) |
void | render (const SceneRenderState *pSceneRenderState, const SceneRenderRequest *pSceneRenderRequest, BatchRender *pBatchRenderer) |
void | setBatchTransformDirty (void) |
bool | getBatchTransformDirty (void) const |
U32 | getBatchTransformId (void) |
const b2Transform & | getBatchTransform (void) const |
void | setLocalExtentsDirty (void) |
bool | getLocalExtentsDirty (void) const |
const Vector2 & | getLocalExtents (void) |
void | createQueryProxy (SpriteBatchItem *pSpriteBatchItem) |
void | destroyQueryProxy (SpriteBatchItem *pSpriteBatchItem) |
void | moveQueryProxy (SpriteBatchItem *pSpriteBatchItem, const b2AABB &localAABB) |
SpriteBatchQuery * | getSpriteBatchQuery (const bool clearQuery=false) |
virtual void | copyTo (SpriteBatch *pSpriteBatch) const |
U32 | getSpriteCount (void) |
U32 | addSprite (const SpriteBatchItem::LogicalPosition &logicalPosition) |
bool | removeSprite (void) |
virtual void | clearSprites (void) |
void | setBatchSortMode (SceneRenderQueue::RenderSort sortMode) |
SceneRenderQueue::RenderSort | getBatchSortMode (void) const |
void | setBatchCulling (const bool batchCulling) |
bool | getBatchCulling (void) const |
void | setDefaultSpriteStride (const Vector2 &defaultStride) |
const Vector2 & | getDefaultSpriteStride (void) const |
void | setDefaultSpriteSize (const Vector2 &defaultSize) |
const Vector2 & | getDefaultSpriteSize (void) const |
void | setDefaultSpriteAngle (const F32 defaultAngle) |
F32 | getDefaultSpriteAngle (void) const |
bool | selectSprite (const SpriteBatchItem::LogicalPosition &logicalPosition) |
bool | selectSpriteId (const U32 batchId) |
bool | selectSpriteName (const char *pName) |
void | deselectSprite (void) |
bool | isSpriteSelected (void) const |
void | setSpriteImage (const char *pAssetId, const U32 imageFrame=0) |
StringTableEntry | getSpriteImage (void) const |
void | setSpriteImageFrame (const U32 imageFrame) |
U32 | getSpriteImageFrame (void) const |
void | setSpriteAnimation (const char *pAssetId) |
StringTableEntry | getSpriteAnimation (void) const |
void | clearSpriteAsset (void) |
void | setSpriteVisible (const bool visible) |
bool | getSpriteVisible (void) const |
void | setSpriteLocalPosition (const Vector2 &localPosition) |
Vector2 | getSpriteLocalPosition (void) |
void | setSpriteAngle (const F32 localAngle) |
F32 | getSpriteAngle (void) const |
void | setSpriteDepth (const F32 depth) |
F32 | getSpriteDepth (void) const |
void | setSpriteSize (const Vector2 &size) |
Vector2 | getSpriteSize (void) const |
void | setSpriteFlipX (const bool flipX) |
bool | getSpriteFlipX (void) const |
void | setSpriteFlipY (const bool flipY) |
bool | getSpriteFlipY (void) const |
void | setSpriteSortPoint (const Vector2 &sortPoint) |
Vector2 | getSpriteSortPoint (void) const |
void | setSpriteRenderGroup (const char *pRenderGroup) |
StringTableEntry | getSpriteRenderGroup (void) const |
void | setSpriteBlendMode (const bool blendMode) |
bool | getSpriteBlendMode (void) const |
void | setSpriteSrcBlendFactor (GLenum srcBlendFactor) |
GLenum | getSpriteSrcBlendFactor (void) const |
void | setSpriteDstBlendFactor (GLenum dstBlendFactor) |
GLenum | getSpriteDstBlendFactor (void) const |
void | setSpriteBlendColor (const ColorF &blendColor) |
const ColorF & | getSpriteBlendColor (void) const |
void | setSpriteBlendAlpha (const F32 alpha) |
F32 | getSpriteBlendAlpha (void) const |
void | setSpriteAlphaTest (const F32 alphaTestMode) |
F32 | getSpriteAlphaTest (void) const |
void | setSpriteDataObject (SimObject *pDataObject) |
SimObject * | getSpriteDataObject (void) const |
void | setUserData (void *pUserData) |
void * | getUserData (void) const |
void | setSpriteName (const char *pName) |
StringTableEntry | getSpriteName (void) const |
Static Public Member Functions | |
static void | WriteCustomTamlSchema (const AbstractClassRep *pClassRep, TiXmlElement *pParentElement) |
Static Public Attributes | |
static const S32 | INVALID_SPRITE_PROXY = -1 |
Protected Types | |
typedef HashMap< U32, SpriteBatchItem * > | typeSpriteBatchHash |
typedef HashMap < SpriteBatchItem::LogicalPosition, SpriteBatchItem * > | typeSpritePositionHash |
typedef HashMap < StringTableEntry, SpriteBatchItem * > | typeSpriteNameHash |
Protected Member Functions | |
SpriteBatchItem * | createSprite (void) |
SpriteBatchItem * | findSpritePosition (const SpriteBatchItem::LogicalPosition &logicalPosition) |
SpriteBatchItem * | findSpriteId (const U32 batchId) |
SpriteBatchItem * | findSpriteName (const char *pName) |
virtual SpriteBatchItem * | createSprite (const SpriteBatchItem::LogicalPosition &logicalPosition) |
void | setBatchTransform (const b2Transform &batchTransform) |
void | updateLocalExtents (void) |
void | createSpriteBatchQuery (void) |
void | destroySpriteBatchQuery (void) |
void | onTamlCustomWrite (TamlCustomNodes &customNodes) |
void | onTamlCustomRead (const TamlCustomNodes &customNodes) |
|
protected |
|
protected |
|
protected |
SpriteBatch | ( | ) |
|
virtual |
U32 addSprite | ( | const SpriteBatchItem::LogicalPosition & | logicalPosition | ) |
void clearSpriteAsset | ( | void | ) |
|
virtual |
|
virtual |
void createQueryProxy | ( | SpriteBatchItem * | pSpriteBatchItem | ) |
|
protected |
|
protectedvirtual |
Reimplemented in CompositeSprite.
|
protected |
|
inline |
void destroyQueryProxy | ( | SpriteBatchItem * | pSpriteBatchItem | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
F32 getSpriteAlphaTest | ( | void | ) | const |
F32 getSpriteAngle | ( | void | ) | const |
StringTableEntry getSpriteAnimation | ( | void | ) | const |
SpriteBatchQuery * getSpriteBatchQuery | ( | const bool | clearQuery = false | ) |
F32 getSpriteBlendAlpha | ( | void | ) | const |
const ColorF & getSpriteBlendColor | ( | void | ) | const |
bool getSpriteBlendMode | ( | void | ) | const |
|
inline |
SimObject * getSpriteDataObject | ( | void | ) | const |
F32 getSpriteDepth | ( | void | ) | const |
GLenum getSpriteDstBlendFactor | ( | void | ) | const |
bool getSpriteFlipX | ( | void | ) | const |
bool getSpriteFlipY | ( | void | ) | const |
StringTableEntry getSpriteImage | ( | void | ) | const |
U32 getSpriteImageFrame | ( | void | ) | const |
Vector2 getSpriteLocalPosition | ( | void | ) |
StringTableEntry getSpriteName | ( | void | ) | const |
StringTableEntry getSpriteRenderGroup | ( | void | ) | const |
Vector2 getSpriteSize | ( | void | ) | const |
Vector2 getSpriteSortPoint | ( | void | ) | const |
GLenum getSpriteSrcBlendFactor | ( | void | ) | const |
bool getSpriteVisible | ( | void | ) | const |
void * getUserData | ( | void | ) | const |
|
inline |
void moveQueryProxy | ( | SpriteBatchItem * | pSpriteBatchItem, |
const b2AABB & | localAABB | ||
) |
|
virtual |
Reimplemented in CompositeSprite.
|
virtual |
Reimplemented in CompositeSprite.
|
protected |
|
protected |
void prepareRender | ( | SceneRenderObject * | pSceneRenderObject, |
const SceneRenderState * | pSceneRenderState, | ||
SceneRenderQueue * | pSceneRenderQueue | ||
) |
bool removeSprite | ( | void | ) |
void render | ( | const SceneRenderState * | pSceneRenderState, |
const SceneRenderRequest * | pSceneRenderRequest, | ||
BatchRender * | pBatchRenderer | ||
) |
bool selectSprite | ( | const SpriteBatchItem::LogicalPosition & | logicalPosition | ) |
bool selectSpriteId | ( | const U32 | batchId | ) |
bool selectSpriteName | ( | const char * | pName | ) |
void setBatchCulling | ( | const bool | batchCulling | ) |
|
inline |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void setSpriteAlphaTest | ( | const F32 | alphaTestMode | ) |
void setSpriteAngle | ( | const F32 | localAngle | ) |
void setSpriteAnimation | ( | const char * | pAssetId | ) |
void setSpriteBlendAlpha | ( | const F32 | alpha | ) |
void setSpriteBlendColor | ( | const ColorF & | blendColor | ) |
void setSpriteBlendMode | ( | const bool | blendMode | ) |
void setSpriteDataObject | ( | SimObject * | pDataObject | ) |
void setSpriteDepth | ( | const F32 | depth | ) |
void setSpriteDstBlendFactor | ( | GLenum | dstBlendFactor | ) |
void setSpriteFlipX | ( | const bool | flipX | ) |
void setSpriteFlipY | ( | const bool | flipY | ) |
void setSpriteImage | ( | const char * | pAssetId, |
const U32 | imageFrame = 0 |
||
) |
void setSpriteImageFrame | ( | const U32 | imageFrame | ) |
void setSpriteLocalPosition | ( | const Vector2 & | localPosition | ) |
void setSpriteName | ( | const char * | pName | ) |
void setSpriteRenderGroup | ( | const char * | pRenderGroup | ) |
void setSpriteSize | ( | const Vector2 & | size | ) |
void setSpriteSortPoint | ( | const Vector2 & | sortPoint | ) |
void setSpriteSrcBlendFactor | ( | GLenum | srcBlendFactor | ) |
void setSpriteVisible | ( | const bool | visible | ) |
void setUserData | ( | void * | pUserData | ) |
|
protected |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |