CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iSpriteCal3DState Struct Reference

This interface describes the API for changing the Cal3D sprite mesh object's animations playing and other current traits. More...

#include <spritecal3d.h>

Inheritance diagram for iSpriteCal3DState:

iBase List of all members.

Public Types

enum  
 List of current animation types, used for introspection mostly. More...


Public Methods

virtual int GetAnimCount ()=0
 Returns the number of animations currently loaded for the core model. More...

virtual const char * GetAnimName (int idx)=0
 Returns the name, from the xml file, of the indexed anim, or NULL if out of bounds. More...

virtual int GetAnimType (int idx)=0
 Returns the type from the enum above, as specified in the XML. More...

virtual void ClearAllAnims ()=0
 This resets all currently blended animations and stops the sprite. More...

virtual bool SetAnimCycle (const char *name, float weight)=0
 This clears the active anims for this sprite and sets it to use only the specified anim. More...

virtual bool AddAnimCycle (const char *name, float weight, float delay)=0
 This adds the specified animation to the ones already being blended by cal3d. More...

virtual bool ClearAnimCycle (const char *name, float delay)=0
 This removes the specified anim from the current blend set over the period of time specifed by "delay" parm in seconds. More...

virtual bool SetAnimAction (const char *name, float delayIn, float delayOut)=0
 This adds a non-looping animation to the blend set for the cal3d Mixer. More...

virtual bool SetVelocity (float vel)=0
 This function searches all actions specified as type TRAVEL, and uses their preferred velocities to create a set of blended animations which will equate in velocity to the specified parm "vel". More...

virtual void SetLOD (float lod)=0
 This function sets the Level of Detail used by the sprite. More...

virtual bool AttachCoreMesh (const char *meshname)=0
 This attaches a mesh with the specified name (from xml) to the instance of the model. More...

virtual bool AttachCoreMesh (int mesh_id, int iMatWrap)=0
 This attaches a mesh with the specified calCoreModel id to the instance of the model. More...

virtual bool DetachCoreMesh (const char *meshname)=0
 This detaches a mesh with the specified name (from xml) to the instance of the model. More...

virtual bool DetachCoreMesh (int mesh_id)=0
 This detaches a mesh with the specified calCoreModel id to the instance of the model. More...

virtual bool BlendMorphTarget (int mesh_id, int morph_id, float weight, float delay)=0
 Blends the morph target. More...

virtual bool ClearMorphTarget (int mesh_id, int morph_id, float delay)=0
 Clears the morph target. More...

virtual bool BlendBase (int mesh_id, float weight, float delay)=0
 Blends the base vectors of a mesh. More...

virtual bool ClearBase (int mesh_id, float delay)=0
 Clears the base vectors of a mesh. More...


Detailed Description

This interface describes the API for changing the Cal3D sprite mesh object's animations playing and other current traits.

Definition at line 155 of file spritecal3d.h.


Member Enumeration Documentation

anonymous enum
 

List of current animation types, used for introspection mostly.

Definition at line 158 of file spritecal3d.h.


Member Function Documentation

virtual bool iSpriteCal3DState::AddAnimCycle const char *    name,
float    weight,
float    delay
[pure virtual]
 

This adds the specified animation to the ones already being blended by cal3d.

The weight value is dependent on other weights used, and is only relative. The delay is the period in seconds over which the blended weight will be interpolated from 0 to "weight" value. A cal3d anim cycle, by definition, is a looping animation (see SetAnimAction for non-looping anims).

virtual bool iSpriteCal3DState::AttachCoreMesh int    mesh_id,
int    iMatWrap
[pure virtual]
 

This attaches a mesh with the specified calCoreModel id to the instance of the model.

It is expected this function is only called by the mesh object itself under normal circumstances. Callers should normally refer to meshes by name to prevent behavior changes when xml order is updated. iMatWrap is the iMaterialWrapper to be used in rendering.

virtual bool iSpriteCal3DState::AttachCoreMesh const char *    meshname [pure virtual]
 

This attaches a mesh with the specified name (from xml) to the instance of the model.

virtual bool iSpriteCal3DState::BlendBase int    mesh_id,
float    weight,
float    delay
[pure virtual]
 

Blends the base vectors of a mesh.

m mesh_id The id of the mesh we want to blend.
m weight The weight of the morph target.
m delay The delay untill the full weight is reached.
Returns:
False if something went wrong.

virtual bool iSpriteCal3DState::BlendMorphTarget int    mesh_id,
int    morph_id,
float    weight,
float    delay
[pure virtual]
 

Blends the morph target.

m mesh_id The id of the mesh we want to blend.
m morph_id The id of the morph target.
m weight The weight of the morph target.
m delay The delay untill the full weight is reached.
Returns:
False if something went wrong.

virtual void iSpriteCal3DState::ClearAllAnims   [pure virtual]
 

This resets all currently blended animations and stops the sprite.

virtual bool iSpriteCal3DState::ClearAnimCycle const char *    name,
float    delay
[pure virtual]
 

This removes the specified anim from the current blend set over the period of time specifed by "delay" parm in seconds.

virtual bool iSpriteCal3DState::ClearBase int    mesh_id,
float    delay
[pure virtual]
 

Clears the base vectors of a mesh.

m mesh_id The id of the mesh we want to clear.
m delay The delay untill the morph target is cleared.
Returns:
False if something went wrong.

virtual bool iSpriteCal3DState::ClearMorphTarget int    mesh_id,
int    morph_id,
float    delay
[pure virtual]
 

Clears the morph target.

m mesh_id The id of the mesh we want to clear.
m morph_id The id of the morph target.
m delay The delay untill the morph target is cleared.
Returns:
False if something went wrong.

virtual bool iSpriteCal3DState::DetachCoreMesh int    mesh_id [pure virtual]
 

This detaches a mesh with the specified calCoreModel id to the instance of the model.

It is expected this function is only called by the mesh object itself under normal circumstances. Callers should normally refer to meshes by name to prevent behavior changes when xml order is updated.

virtual bool iSpriteCal3DState::DetachCoreMesh const char *    meshname [pure virtual]
 

This detaches a mesh with the specified name (from xml) to the instance of the model.

virtual int iSpriteCal3DState::GetAnimCount   [pure virtual]
 

Returns the number of animations currently loaded for the core model.

virtual const char* iSpriteCal3DState::GetAnimName int    idx [pure virtual]
 

Returns the name, from the xml file, of the indexed anim, or NULL if out of bounds.

virtual int iSpriteCal3DState::GetAnimType int    idx [pure virtual]
 

Returns the type from the enum above, as specified in the XML.

virtual bool iSpriteCal3DState::SetAnimAction const char *    name,
float    delayIn,
float    delayOut
[pure virtual]
 

This adds a non-looping animation to the blend set for the cal3d Mixer.

This animation will play one time overlaid on top of the other currently active animations. delayIn and delayOut allow you to fade in and fade out the action for smoothness of response.

virtual bool iSpriteCal3DState::SetAnimCycle const char *    name,
float    weight
[pure virtual]
 

This clears the active anims for this sprite and sets it to use only the specified anim.

virtual void iSpriteCal3DState::SetLOD float    lod [pure virtual]
 

This function sets the Level of Detail used by the sprite.

This is used to reduce the polygon count and simplify the scene for the renderer.

virtual bool iSpriteCal3DState::SetVelocity float    vel [pure virtual]
 

This function searches all actions specified as type TRAVEL, and uses their preferred velocities to create a set of blended animations which will equate in velocity to the specified parm "vel".

The calling program is still responsible for actually moving the sprite.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14