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:

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. | |
virtual const char * | GetAnimName (int idx)=0 |
Returns the name, from the xml file, of the indexed anim, or 0 if out of bounds. | |
virtual int | GetAnimType (int idx)=0 |
Returns the type from the enum above, as specified in the XML. | |
virtual void | ClearAllAnims ()=0 |
This resets all currently blended animations and stops the sprite. | |
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, where the anim is specified by name. | |
virtual bool | SetAnimCycle (int idx, float weight)=0 |
This clears the active anims for this sprite and sets it to use only the specified anim, where the anim is specified by index. | |
virtual bool | AddAnimCycle (const char *name, float weight, float delay)=0 |
This adds the specified animation to the ones already being blended by cal3d. | |
virtual bool | AddAnimCycle (int idx, float weight, float delay)=0 |
Uses the specified index directly to add the anim cycle. | |
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. | |
virtual int | GetActiveAnimCount ()=0 |
Returns the count of currently playing animation cycles. | |
virtual int | GetActiveAnims (char *buffer, int max_length)=0 |
Fills the supplied buffer with the information to reconstruct the exact animation mix currently playing in the model. | |
virtual void | SetActiveAnims (const char *buffer, int anim_count)=0 |
Uses the supplied buffer (created by GetActiveAnims) to recreate an exact mix of animation cycles and weights. | |
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. | |
virtual bool | SetAnimAction (int idx, float delayIn, float delayOut)=0 |
This adds a non-looping animation to the blend set for the cal3d Mixer. | |
virtual bool | SetVelocity (float vel, csRandomGen *rng=0)=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". | |
virtual void | SetLOD (float lod)=0 |
This function sets the Level of Detail used by the sprite. | |
virtual bool | AttachCoreMesh (const char *meshname)=0 |
This attaches a mesh with the specified name (from xml) to the instance of the model. | |
virtual bool | AttachCoreMesh (int mesh_id, int iMatWrap)=0 |
This attaches a mesh with the specified calCoreModel id to the instance of the model. | |
virtual bool | DetachCoreMesh (const char *meshname)=0 |
This detaches a mesh with the specified name (from xml) to the instance of the model. | |
virtual bool | DetachCoreMesh (int mesh_id)=0 |
This detaches a mesh with the specified calCoreModel id to the instance of the model. | |
virtual bool | BlendMorphTarget (int morph_animation_id, float weight, float delay)=0 |
Blends the morph target. | |
virtual bool | ClearMorphTarget (int morph_animation_id, float delay)=0 |
Clears the morph target. | |
virtual iSpriteCal3DSocket * | FindSocket (iMeshWrapper *mesh) const=0 |
find a socked based on the sprite attached to it. | |
virtual iSpriteCal3DSocket * | FindSocket (const char *name) const=0 |
find a named socket into the sprite. | |
virtual bool | SetMaterial (const char *mesh_name, iMaterialWrapper *mat)=0 |
Change the material on a named submesh. Returns true if successful. | |
virtual void | SetTimeFactor (float timeFactor)=0 |
Set the animation time adjustment factor. 1=normal speed. | |
virtual float | GetTimeFactor ()=0 |
Return the current time factor of the model. | |
virtual float | GetAnimationTime ()=0 |
Return current animation time. | |
virtual float | GetAnimationDuration ()=0 |
Return whole animation duration. | |
virtual void | SetAnimationTime (float animationTime)=0 |
Set current animation time. |
Detailed Description
This interface describes the API for changing the Cal3D sprite mesh object's animations playing and other current traits.
Definition at line 287 of file spritecal3d.h.
Member Enumeration Documentation
|
List of current animation types, used for introspection mostly.
Definition at line 290 of file spritecal3d.h. |
Member Function Documentation
|
Uses the specified index directly to add the anim cycle.
|
|
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). |
|
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. |
|
This attaches a mesh with the specified name (from xml) to the instance of the model.
|
|
Blends the morph target.
|
|
This resets all currently blended animations and stops the sprite.
|
|
This removes the specified anim from the current blend set over the period of time specifed by "delay" parm in seconds.
|
|
Clears the morph target.
|
|
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. |
|
This detaches a mesh with the specified name (from xml) to the instance of the model.
|
|
find a named socket into the sprite.
|
|
find a socked based on the sprite attached to it.
|
|
Returns the count of currently playing animation cycles. This should be used to allocate the buffer required by GetActiveAnims below. 2 bytes per active anim are required. |
|
Fills the supplied buffer with the information to reconstruct the exact animation mix currently playing in the model. It does NOT include any non-repeating actions. Those must be handled separately, due to the timing issues. |
|
Return whole animation duration.
|
|
Return current animation time.
|
|
Returns the number of animations currently loaded for the core model.
|
|
Returns the name, from the xml file, of the indexed anim, or 0 if out of bounds.
|
|
Returns the type from the enum above, as specified in the XML.
|
|
Return the current time factor of the model.
|
|
Uses the supplied buffer (created by GetActiveAnims) to recreate an exact mix of animation cycles and weights.
|
|
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. |
|
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. |
|
Set current animation time.
|
|
This clears the active anims for this sprite and sets it to use only the specified anim, where the anim is specified by index.
|
|
This clears the active anims for this sprite and sets it to use only the specified anim, where the anim is specified by name.
|
|
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. |
|
Change the material on a named submesh. Returns true if successful.
|
|
Set the animation time adjustment factor. 1=normal speed.
|
|
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:
- imesh/spritecal3d.h
Generated for Crystal Space by doxygen 1.2.18