iSkeleton Struct Reference
The skeleton interface provides needed functionality of a skeleton animation. More...
#include <imesh/skeleton.h>
Public Member Functions | |
virtual size_t | AddUpdateCallback (iSkeletonUpdateCallback *update_callback)=0 |
Adds skeleton update callback. | |
virtual iSkeletonAnimation * | Append (const char *animation_name)=0 |
Append animation for execution. | |
virtual void | ClearPendingAnimations ()=0 |
Clear animations for execution. | |
virtual iSkeletonAnimation * | Execute (const char *animation_name, float blend_factor=0.0f)=0 |
Execute specific animation. | |
virtual iSkeletonAnimation * | FindAnimation (const char *animation_name)=0 |
Find animation by name. | |
virtual iSkeletonBone * | FindBone (const char *name)=0 |
Find bone by name. | |
virtual size_t | FindBoneIndex (const char *name)=0 |
Find bine index by name. | |
virtual iSkeletonSocket * | FindSocket (const char *socketname)=0 |
Find socket by name. | |
virtual iSkeletonAnimation * | GetAnimation (size_t i)=0 |
Get animation by index. | |
virtual size_t | GetAnimationsCount ()=0 |
Get number of running animations. | |
virtual iSkeletonBone * | GetBone (size_t i)=0 |
Get bone by index. | |
virtual size_t | GetBonesCount ()=0 |
Get number of bones in the skeleton. | |
virtual iSkeletonFactory * | GetFactory ()=0 |
Get skeleton factory. | |
virtual const char * | GetName () const =0 |
Get skeleton name. | |
virtual iSkeletonUpdateCallback * | GetUpdateCallback (size_t callback_idx)=0 |
Get callback by index. | |
virtual size_t | GetUpdateCallbacksCount ()=0 |
Get number of skeleton callbacks. | |
virtual iSkeletonAnimationInstance * | Play (const char *animation_name)=0 |
Play specific animation. | |
virtual void | RemoveUpdateCallback (size_t callback_idx)=0 |
Remove skelton callback by index. | |
virtual void | SetAnimationCallback (iSkeletonAnimationCallback *cb)=0 |
Set animation callback. | |
virtual void | SetName (const char *name)=0 |
Set skeleton name. | |
virtual void | Stop (const char *animation_name)=0 |
Stop executed animation by name. | |
virtual void | Stop (iSkeletonAnimationInstance *anim_instance)=0 |
Stop animation. | |
virtual void | StopAll ()=0 |
Stop all executed animations. | |
virtual bool | UpdateAnimation (csTicks current_time)=0 |
Update animations state. | |
virtual void | UpdateBones ()=0 |
Update skeleton bones. |
Detailed Description
The skeleton interface provides needed functionality of a skeleton animation.
It holds bones, sockets and scripts. Skeleton is an independend object and it is not realted to a mesh. Genmesh Skelton Animation 2 plugin makes the connection between mesh and skeleton. Users can query the iSkeleton from genmeshes as follows:
csRef<iGeneralMeshState> genmesh_state ( scfQueryInterface<iGeneralMeshState> (mesh_wrapper->GetMeshObject ())); csRef<iGenMeshSkeletonControlState> animcontrol ( scfQueryInterface<iGenMeshSkeletonControlState> ( genmesh_state->GetAnimationControl ())); iSkeleton* skeleton = animcontrol->GetSkeleton ();
Definition at line 422 of file skeleton.h.
Member Function Documentation
virtual size_t iSkeleton::AddUpdateCallback | ( | iSkeletonUpdateCallback * | update_callback | ) | [pure virtual] |
Adds skeleton update callback.
virtual iSkeletonAnimation* iSkeleton::Append | ( | const char * | animation_name | ) | [pure virtual] |
Append animation for execution.
Plays after all current animations have finished. Then the first Append'ed animation is played... then the next... and so on.
virtual void iSkeleton::ClearPendingAnimations | ( | ) | [pure virtual] |
Clear animations for execution.
virtual iSkeletonAnimation* iSkeleton::Execute | ( | const char * | animation_name, | |
float | blend_factor = 0.0f | |||
) | [pure virtual] |
Execute specific animation.
virtual iSkeletonAnimation* iSkeleton::FindAnimation | ( | const char * | animation_name | ) | [pure virtual] |
Find animation by name.
virtual iSkeletonBone* iSkeleton::FindBone | ( | const char * | name | ) | [pure virtual] |
Find bone by name.
virtual size_t iSkeleton::FindBoneIndex | ( | const char * | name | ) | [pure virtual] |
Find bine index by name.
virtual iSkeletonSocket* iSkeleton::FindSocket | ( | const char * | socketname | ) | [pure virtual] |
Find socket by name.
virtual iSkeletonAnimation* iSkeleton::GetAnimation | ( | size_t | i | ) | [pure virtual] |
Get animation by index.
virtual size_t iSkeleton::GetAnimationsCount | ( | ) | [pure virtual] |
Get number of running animations.
virtual iSkeletonBone* iSkeleton::GetBone | ( | size_t | i | ) | [pure virtual] |
Get bone by index.
virtual size_t iSkeleton::GetBonesCount | ( | ) | [pure virtual] |
Get number of bones in the skeleton.
virtual iSkeletonFactory* iSkeleton::GetFactory | ( | ) | [pure virtual] |
Get skeleton factory.
virtual const char* iSkeleton::GetName | ( | ) | const [pure virtual] |
Get skeleton name.
virtual iSkeletonUpdateCallback* iSkeleton::GetUpdateCallback | ( | size_t | callback_idx | ) | [pure virtual] |
Get callback by index.
virtual size_t iSkeleton::GetUpdateCallbacksCount | ( | ) | [pure virtual] |
Get number of skeleton callbacks.
virtual iSkeletonAnimationInstance* iSkeleton::Play | ( | const char * | animation_name | ) | [pure virtual] |
Play specific animation.
Returns played animation instance.
virtual void iSkeleton::RemoveUpdateCallback | ( | size_t | callback_idx | ) | [pure virtual] |
Remove skelton callback by index.
virtual void iSkeleton::SetAnimationCallback | ( | iSkeletonAnimationCallback * | cb | ) | [pure virtual] |
Set animation callback.
virtual void iSkeleton::SetName | ( | const char * | name | ) | [pure virtual] |
Set skeleton name.
virtual void iSkeleton::Stop | ( | const char * | animation_name | ) | [pure virtual] |
Stop executed animation by name.
virtual void iSkeleton::Stop | ( | iSkeletonAnimationInstance * | anim_instance | ) | [pure virtual] |
Stop animation.
virtual void iSkeleton::StopAll | ( | ) | [pure virtual] |
Stop all executed animations.
virtual bool iSkeleton::UpdateAnimation | ( | csTicks | current_time | ) | [pure virtual] |
Update animations state.
Returns 'false' when no update was aplied.
virtual void iSkeleton::UpdateBones | ( | ) | [pure virtual] |
Update skeleton bones.
Normaly you won't ever need to call this method by yourself (updating bones is done via 'UpdateAnimation'), but you will need to use it too see changes after direct pose changes when you are not updating animations for some reason.
The documentation for this struct was generated from the following file:
- imesh/skeleton.h
Generated for Crystal Space 2.0 by doxygen 1.6.1