In file include/csengine/cssprite.h:

class csSpriteTemplate : public csObject

A 3D sprite based on a triangle mesh with a single texture

Inheritance:


Public Methods

csSpriteAction* AddAction()
Create and add a new action frameset to the sprite.
csFrame* AddFrame()
Create and add a new frame to the sprite.
void ComputeBoundingBox()
Compute the object space bounding box for all frames in this template
csSpriteTemplate()
Create the sprite template
csSpriteAction* FindAction(const char * name)
find a named action into the sprite.
csFrame* FindFrame(char * name)
find a named frame into the sprite.
void GenerateLOD()
Generate the collapse order
csSpriteAction* GetAction(int No)
Get action number No
csTriangleMesh* GetBaseMesh()
Get the base triangle mesh of this sprite
int* GetEmergeFrom()
Get the 'emerge_from' array from which you can construct triangles.
csSpriteAction* GetFirstAction()
Get the first action.
csFrame* GetFrame(int f)
Query the frame number f
int GetNumActions()
Get number of actions in sprite
int GetNumFrames()
Query the number of frames
int GetNumVertices()
Query the number of vertices.
csSkeleton* GetSkeleton()
Get the skeleton for this sprite template.
csTextureHandle* GetTexture()
Get the texture
ITextureHandle* GetTextureHandle()
Get the texture handle.
csSprite3D* NewSprite()
Create a new sprite for this template
void SetNumVertices(int v)
Set the number of vertices.
void SetSkeleton(csSkeleton* sk)
Set the skeleton for this sprite template.
void SetTexture(csTextureList* textures, char *texname)
Set the texture used for this sprite
virtual ~csSpriteTemplate()
Destroy the template

Private Fields

csObjVector actions
The actions (a vector of csSpriteAction objects)
csTriangleMesh* base_mesh
The triangles.
csTextureHandle* cstxt
Texture handle as returned by ITextureManager.
int* emerge_from
The order in which to introduce levels in order to get to a higher LOD
csObjVector frames
The frames
int num_vertices
The vertices.
csSkeleton* skeleton
An optional skeleton.

Inherited from csObject:

Public Methods

CS_ID GetID()
csObject* GetObj(const csIdType& objtype)
virtual csObject* GetObjectParent()
void ObjAdd(csObject* obj)
csObjIterator ObjGet(const csIdType& objtype)
void ObjRelease(csObject* obj)
void ObjRemove(csObject* obj)

Private Fields

CS_ID csid_value
csObjTree* objtree

Private Methods

virtual void SetObjectParent(csObject* parent)

Inherited from csBase:


Documentation

A 3D sprite based on a triangle mesh with a single texture. Animation is done with frames. This class represents a template from which a csSprite3D class can be made.
csTextureHandle* cstxt
Texture handle as returned by ITextureManager.

int num_vertices
The vertices.

csTriangleMesh* base_mesh
The triangles.

csSkeleton* skeleton
An optional skeleton.

int* emerge_from
The order in which to introduce levels in order to get to a higher LOD. The index of this array is the vertex number which is introduced. The vertices of this template were reordered (by GenerateLOD()) so that the first vertices are used in low-detail. The contents of this array is the vertex number to emerge from.

csObjVector frames
The frames

csObjVector actions
The actions (a vector of csSpriteAction objects)

csSpriteTemplate()
Create the sprite template

virtual ~csSpriteTemplate()
Destroy the template

csSprite3D* NewSprite()
Create a new sprite for this template. The 'default' action will be made default. If there is no default action the first action will be made default. The sprite will also be initialized (csSprite3D::InitSprite()).

csTriangleMesh* GetBaseMesh()
Get the base triangle mesh of this sprite

void SetSkeleton(csSkeleton* sk)
Set the skeleton for this sprite template.

csSkeleton* GetSkeleton()
Get the skeleton for this sprite template.

int* GetEmergeFrom()
Get the 'emerge_from' array from which you can construct triangles.

void GenerateLOD()
Generate the collapse order. This function will also reorder all the vertices in the template. So be careful!

void ComputeBoundingBox()
Compute the object space bounding box for all frames in this template. This has to be called after setting up the template and before using it.

void SetNumVertices(int v)
Set the number of vertices.

int GetNumVertices()
Query the number of vertices.

csFrame* AddFrame()
Create and add a new frame to the sprite.

csFrame* FindFrame(char * name)
find a named frame into the sprite.

int GetNumFrames()
Query the number of frames

csFrame* GetFrame(int f)
Query the frame number f

csSpriteAction* AddAction()
Create and add a new action frameset to the sprite.

csSpriteAction* FindAction(const char * name)
find a named action into the sprite.

csSpriteAction* GetFirstAction()
Get the first action.

int GetNumActions()
Get number of actions in sprite

csSpriteAction* GetAction(int No)
Get action number No

csTextureHandle* GetTexture()
Get the texture

ITextureHandle* GetTextureHandle()
Get the texture handle.

void SetTexture(csTextureList* textures, char *texname)
Set the texture used for this sprite


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de