CrystalSpace

Public API Reference

iSkeletonFactory2 Struct Reference
[Mesh plugins]

A skeleton factory is an object defining the base pose and topology from which skeleton instances can be created. More...

#include <imesh/skeleton2.h>

Inheritance diagram for iSkeletonFactory2:

List of all members.

Public Member Functions

virtual csPtr< iSkeleton2CreateSkeleton ()=0
 Create a skeleton instance from this skeleton factory.
virtual
iSkeletonAnimPacketFactory2
GetAnimationPacket () const =0
 Get the animation packet associated with this skeleton.
virtual void SetAnimationPacket (iSkeletonAnimPacketFactory2 *fact)=0
 Set the animation packet associated with this skeleton.
Bone handling

virtual BoneID CreateBone (BoneID parent=InvalidBoneID)=0
 Create a new bone with given parent.
virtual BoneID FindBone (const char *name) const =0
 Create a new bone with given parent.
virtual void RemoveBone (BoneID bone)=0
 Remove a bone from skeleton.
virtual BoneID GetBoneParent (BoneID bone) const =0
 Get the bone parent id.
virtual bool HasBone (BoneID bone) const =0
 Return true if bone with given id exists within skeleton factory.
virtual void SetBoneName (BoneID bone, const char *name)=0
 Set a name of a bone for later identificaton.
virtual const char * GetBoneName (BoneID bone) const =0
 Get the name of a bone.
virtual BoneID GetTopBoneID () const =0
 Get the highest bone ID used in skeleton.
virtual void GetTransformBoneSpace (BoneID bone, csQuaternion &rot, csVector3 &offset) const =0
 Get the bone transform in bone space.
virtual void SetTransformBoneSpace (BoneID bone, const csQuaternion &rot, const csVector3 &offset)=0
 Set the bone transform in bone space.
virtual void GetTransformAbsSpace (BoneID bone, csQuaternion &rot, csVector3 &offset) const =0
 Get the bone transform in skeleton absolute space.
virtual void SetTransformAbsSpace (BoneID bone, const csQuaternion &rot, const csVector3 &offset)=0
 Set the bone transform in skeleton absolute space.

Detailed Description

A skeleton factory is an object defining the base pose and topology from which skeleton instances can be created.

A note on coordinate spaces, cause there are a few to keep track of. Within the skeleton factory there are two types coordinate spaces:

Definition at line 113 of file skeleton2.h.


Member Function Documentation

virtual BoneID iSkeletonFactory2::CreateBone ( BoneID  parent = InvalidBoneID  )  [pure virtual]

Create a new bone with given parent.

Parameters:
parent bone id of parent or ~0 for no parent which creates a top level bone
virtual csPtr<iSkeleton2> iSkeletonFactory2::CreateSkeleton (  )  [pure virtual]

Create a skeleton instance from this skeleton factory.

virtual BoneID iSkeletonFactory2::FindBone ( const char *  name  )  const [pure virtual]

Create a new bone with given parent.

Parameters:
parent bone id of parent or ~0 for no parent which creates a top level bone
virtual iSkeletonAnimPacketFactory2* iSkeletonFactory2::GetAnimationPacket (  )  const [pure virtual]

Get the animation packet associated with this skeleton.

virtual const char* iSkeletonFactory2::GetBoneName ( BoneID  bone  )  const [pure virtual]

Get the name of a bone.

virtual BoneID iSkeletonFactory2::GetBoneParent ( BoneID  bone  )  const [pure virtual]

Get the bone parent id.

Returns:
parent id on success. Non existing bones will return ~0 as parent.
Parameters:
bone bone Id
virtual BoneID iSkeletonFactory2::GetTopBoneID (  )  const [pure virtual]

Get the highest bone ID used in skeleton.

virtual void iSkeletonFactory2::GetTransformAbsSpace ( BoneID  bone,
csQuaternion rot,
csVector3 offset 
) const [pure virtual]

Get the bone transform in skeleton absolute space.

Parameters:
bone bone id to get the transform for
rot rotation quaternion
offset movement offset
virtual void iSkeletonFactory2::GetTransformBoneSpace ( BoneID  bone,
csQuaternion rot,
csVector3 offset 
) const [pure virtual]

Get the bone transform in bone space.

Parameters:
bone bone id to get the transform for
rot rotation quaternion
offset movement offset
virtual bool iSkeletonFactory2::HasBone ( BoneID  bone  )  const [pure virtual]

Return true if bone with given id exists within skeleton factory.

virtual void iSkeletonFactory2::RemoveBone ( BoneID  bone  )  [pure virtual]

Remove a bone from skeleton.

Any bones having the removed bone as parent will be reparented one step up the chain.

Parameters:
bone bone id of bone to remove
virtual void iSkeletonFactory2::SetAnimationPacket ( iSkeletonAnimPacketFactory2 fact  )  [pure virtual]

Set the animation packet associated with this skeleton.

virtual void iSkeletonFactory2::SetBoneName ( BoneID  bone,
const char *  name 
) [pure virtual]

Set a name of a bone for later identificaton.

virtual void iSkeletonFactory2::SetTransformAbsSpace ( BoneID  bone,
const csQuaternion rot,
const csVector3 offset 
) [pure virtual]

Set the bone transform in skeleton absolute space.

Parameters:
bone bone id to set the transform for
rot rotation quaternion
offset movement offset
virtual void iSkeletonFactory2::SetTransformBoneSpace ( BoneID  bone,
const csQuaternion rot,
const csVector3 offset 
) [pure virtual]

Set the bone transform in bone space.

Parameters:
bone bone id to set the transform for
rot rotation quaternion
offset movement offset

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

Generated for Crystal Space 1.4.1 by doxygen 1.7.1