## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iSkeleton Struct Reference

The skeleton interface provides needed functionality of a skeleton animation. More...

`#include <imesh/skeleton.h>`

Inheritance diagram for iSkeleton:

[legend]
List of all members.

## Public Member Functions

virtual size_t | AddUpdateCallback (iSkeletonUpdateCallback *update_callback)=0
| Adds skeleton update callback.
virtual iSkeletonScript * | Append (const char *scriptname)=0
| Append script for execution.
virtual void | ClearPendingScripts ()=0
| Clear scripts for execution.
virtual iSkeletonScript * | Execute (const char *scriptname)=0
| Execute specific script.
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 iSkeletonScript * | FindScript (const char *scriptname)=0
| Find script by name.
virtual iSkeletonSocket * | FindSocket (const char *socketname)=0
| Find socket by name.
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 iSkeletonScript * | GetScript (size_t i)=0
| General script by index.
virtual size_t | GetScriptsCount ()=0
| Get number of available scripts.
virtual iSkeletonUpdateCallback * | GetUpdateCallback (size_t callback_idx)=0
| Get callback by index.
virtual size_t | GetUpdateCallbacksCount ()=0
| Get number of skeleton callbacks.
virtual void | RemoveUpdateCallback (size_t callback_idx)=0
| Remove skelton callback by index.
virtual void | SetName (const char *name)=0
| Set skeleton name.
virtual void | SetScriptCallback (iSkeletonScriptCallback *cb)=0
| Get script callback.
virtual void | Stop (const char *scriptname)=0
| Stop executed script by name.
virtual void | StopAll ()=0
| Stop all executed scripts.

## 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 ( SCF_QUERY_INTERFACE (mesh_wrapper->GetMeshObject (), iGeneralMeshState)); csRef<iGenMeshSkeletonControlState> animcontrol ( SCF_QUERY_INTERFACE (genmesh_state->GetAnimationControl (), iGenMeshSkeletonControlState)); iSkeleton* skeleton = animcontrol->GetSkeleton ();

Definition at line 367 of file skeleton.h.

## Member Function Documentation

virtual size_t iSkeleton::AddUpdateCallback | ( | iSkeletonUpdateCallback * | update_callback | ) | `[pure virtual]`

Adds skeleton update callback.

virtual iSkeletonScript* iSkeleton::Append | ( | const char * | scriptname | ) | `[pure virtual]`

Append script for execution.

virtual void iSkeleton::ClearPendingScripts | ( |  | ) | `[pure virtual]`

Clear scripts for execution.

virtual iSkeletonScript* iSkeleton::Execute | ( | const char * | scriptname | ) | `[pure virtual]`

Execute specific script.

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 iSkeletonScript* iSkeleton::FindScript | ( | const char * | scriptname | ) | `[pure virtual]`

Find script by name.

virtual iSkeletonSocket* iSkeleton::FindSocket | ( | const char * | socketname | ) | `[pure virtual]`

Find socket by name.

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 iSkeletonScript* iSkeleton::GetScript | ( | size_t | i | ) | `[pure virtual]`

General script by index.

virtual size_t iSkeleton::GetScriptsCount | ( |  | ) | `[pure virtual]`

Get number of available scripts.

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 void iSkeleton::RemoveUpdateCallback | ( | size_t | callback_idx | ) | `[pure virtual]`

Remove skelton callback by index.

virtual void iSkeleton::SetName | ( | const char * | name | ) | `[pure virtual]`

Set skeleton name.

virtual void iSkeleton::SetScriptCallback | ( | iSkeletonScriptCallback * | cb | ) | `[pure virtual]`

Get script callback.

virtual void iSkeleton::Stop | ( | const char * | scriptname | ) | `[pure virtual]`

Stop executed script by name.

virtual void iSkeleton::StopAll | ( |  | ) | `[pure virtual]`

Stop all executed scripts.

The documentation for this struct was generated from the following file:

- imesh/skeleton.h