class csSprite3D : public csObject A 3D sprite based on a triangle mesh with a single texture
| | cfg_lod_detail Configuration value for global LOD |
| | sectors List of sectors where this sprite is. |
| | AddBoundingBox (csBspContainer* container) Calculate a bounding box for this sprite in world space and add the resulting polygons to the given container |
| | AddDynamicLight (csLightHitsSprite *lp) Add a light-hits-sprite to the list |
| | AddVertexColor (int i, const csColor& col) Add a color for a vertex |
| | csSprite3D () |
| | DeferUpdateLighting (int flags, int num_lights) Update lighting as soon as the sprite becomes visible |
| | Draw (csRenderView& rview) Draw this sprite given a camera transformation |
| | FixVertexColors () Clamp all vertice colors to 2 |
| | GenerateSpriteLOD (int num_vts) Fill the static mesh with the current sprite for a given LOD level |
| | GetCurAction () Get the current frame number |
| | GetCurFrame () Get the current frame number |
| | GetDrawCallback () Get the draw callback |
| | GetDynamicLights () Get the list of dynamic lights that hit this sprite |
| | GetNumFrames () Get the number of frames |
| | GetObjectVerts (csFrame* fr) Get an array of object vertices which is valid for the given frame |
| | GetSkeletonState () Get the skeleton state for this sprite. |
| | GetTemplate () |
| | GetW2T () Get world to local transformation matrix |
| | GetW2TTranslation () Get world to local translation |
| | InitSprite () Initialize a sprite |
| | IsVisible () Return if this sprite is visible. |
| | MarkInvisible () Mark this sprite as invisible. |
| | MarkVisible () Mark this sprite as visible. |
| | Move (float dx, float dy, float dz) Relative move |
| | Move (csVector3& v) Relative move |
| | MoveTo (float x, float y, float z) The same as above |
| | MoveTo (const csVector3& v) Absolute move |
| | MoveToSector (csSector* s) Move this sprite to one sector (conveniance function). |
| | NextFrame (long current_time, bool onestep = false, bool stoptoend = false) Go to the next frame depending on the current time in milliseconds |
| | RemoveFromSectors () Remove this sprite from all sectors it is in (but not from the world). |
| | ResetVertexColors () Reset the color list |
| | SetAction (const char * name) Select an action |
| | SetDrawCallback (csSpriteCallback* callback) Set a callback which is called just before the sprite is drawn |
| | SetFrame (int f) Go to a specified frame |
| | SetMixmode (UInt m) Sets the mode that is used, when drawing that sprite. |
| | SetMove (float x, float y, float z) Set the transformation vector to move sprite to some position |
| | SetMove (const csVector3& v) Set the transformation vector to move sprite to some position |
| | SetTemplate (csSpriteTemplate* tmpl) |
| | SetTexture (char * name, csTextureList* textures) force a new texture skin other than default |
| | SetTransform (const csMatrix3& matrix) Set the transformation matrix to rotate the sprite in some orientation |
| | SetVertexColor (int i, const csColor& col) Set a color for a vertex |
| | Transform (csMatrix3& matrix) Relative transform |
| | UnlinkDynamicLight (csLightHitsSprite* lp) Unlink a light-hits-sprite from the list |
| | UnsetTexture () |
| | UpdateLighting (csLight** lights, int num_lights) Light sprite according to the given array of lights (i |
| | ~csSprite3D () |
| | cstxt The texture handle as returned by ITextureManager. |
| | cur_action The current action. |
| | cur_frame The current frame number. |
| | defered_lighting_flags Flags to use for defered lighting. |
| | defered_num_lights Defered lighting. If > 0 then we have defered lighting. |
| | draw_callback The callback which is called just before drawing. |
| | dynamiclights List of light-hits-sprites for this sprite |
| | force_otherskin |
| | is_visible Flag which is set to true when the sprite is visible |
| | last_time The last frame time action |
| | light_worktable Array for lighting. |
| | m_obj2world Object to world transformation. |
| | m_world2obj World to object transformation. |
| | mesh A mesh which contains a number of triangles as generated by the LOD algorithm |
| | persp The perspective corrected vertices. |
| | skeleton_state Skeleton state (optional). |
| | tpl The template. |
| | tr_verts Static vertex array. |
| | uv_verts Static uv array. |
| | v_obj2world Object to world transformation. |
| | vertex_colors Array of colors for the vertices |
| | visible Array which indicates which vertices are visible and which are not. |
| | z_verts Static z array. |
| | UpdateDeferedLighting () Update defered lighting. |
| | UpdateWorkTables (int max_size) Update the above tables with a new size. |
A 3D sprite based on a triangle mesh with a single texture. Animation is done with frames (a frame may be controlled by a skeleton).
static float* z_verts
static csVector2* uv_verts
static csVector2* persp
static bool* visible
static csLight** light_worktable
static void UpdateWorkTables(int max_size)
void UpdateDeferedLighting()
csObjVector sectors
static float cfg_lod_detail
csVector3 v_obj2world
csMatrix3 m_obj2world
csMatrix3 m_world2obj
static csTriangleMesh mesh
csColor* vertex_colors
csSpriteTemplate* tpl
csTextureHandle* cstxt
int cur_frame
csSpriteAction* cur_action
int last_time
bool force_otherskin
csLightHitsSprite* dynamiclights
csSkeletonState* skeleton_state
int defered_num_lights
int defered_lighting_flags
csSpriteCallback* draw_callback
bool is_visible
csSprite3D()
virtual ~csSprite3D()
void SetTemplate(csSpriteTemplate* tmpl)
csSpriteTemplate* GetTemplate()
csSkeletonState* GetSkeletonState()
void SetTexture(char * name, csTextureList* textures)
void MarkVisible()
void MarkInvisible()
bool IsVisible()
void SetVertexColor(int i, const csColor& col)
void AddVertexColor(int i, const csColor& col)
void ResetVertexColors()
void FixVertexColors()
void UpdateLighting(csLight** lights, int num_lights)
void DeferUpdateLighting(int flags, int num_lights)
void UnsetTexture()
void SetMixmode(UInt m)
void SetMove(const csVector3& v)
void SetMove(float x, float y, float z)
void SetTransform(const csMatrix3& matrix)
void Move(float dx, float dy, float dz)
void Move(csVector3& v)
bool MoveTo(const csVector3& v)
bool MoveTo(float x, float y, float z)
void Transform(csMatrix3& matrix)
void AddBoundingBox(csBspContainer* container)
void GenerateSpriteLOD(int num_vts)
void Draw(csRenderView& rview)
void SetDrawCallback(csSpriteCallback* callback)
csSpriteCallback* GetDrawCallback()
bool NextFrame(long current_time, bool onestep = false, bool stoptoend = false)
void SetFrame(int f)
int GetCurFrame()
csSpriteAction* GetCurAction()
int GetNumFrames()
void SetAction(const char * name)
void InitSprite()
inline csMatrix3 GetW2T()
inline csVector3 GetW2TTranslation()
void MoveToSector(csSector* s)
void RemoveFromSectors()
csVector3* GetObjectVerts(csFrame* fr)
Warning! The returned array should be used immediatelly or copied. It
points to a private static array in the sprite class and can be reused
if other calls to the sprite happen.
void UnlinkDynamicLight(csLightHitsSprite* lp)
void AddDynamicLight(csLightHitsSprite *lp)
csLightHitsSprite* GetDynamicLights()
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de