DigitalSpaces::DIOGRESkeleton Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

DIOGREBoneCreateBone (void)
 Creates a brand new Bone owned by this Skeleton.
DIOGREBoneCreateBone (unsigned short handle)
 Creates a brand new Bone owned by this Skeleton.
DIOGREBoneCreateBone (const char *name)
 Creates a brand new Bone owned by this Skeleton.
DIOGREBoneCreateBone (const char *name, unsigned short handle)
 Creates a brand new Bone owned by this Skeleton.
unsigned short GetNumBones (void)
 Returns the number of bones in this skeleton.
DIOGREBoneGetRootBone (void)
 Gets the root bone of the skeleton: deprecated in favour of getRootBoneIterator.
DIOGREBoneGetBone (unsigned short handle)
 Gets a bone by it's handle.
DIOGREBoneGetBone (const char *name)
 Gets a bone by it's name.
void SetBindingPose (void)
 Sets the current position / orientation to be the 'binding pose' ie the layout in which bones were originally bound to a mesh.
void Reset (bool resetManualBones)
 Resets the position and orientation of all bones in this skeleton to their original binding position.
DIOGREAnimationCreateAnimation (const char *name, float length)
 Creates a new Animation object for animating this skeleton.
void RemoveAnimation (const char *name)
 Returns the named Animation object.
unsigned short GetNumAnimations (void)
 Changes the state of the skeleton to reflect the application of the passed in collection of animations.
DIOGREAnimationGetAnimation (unsigned short index)
 Gets a single animation by index.
OGRESkeletonAnimationBlendMode GetBlendMode ()
 Gets the animation blending mode which this skeleton will use.
void SetBlendMode (OGRESkeletonAnimationBlendMode state)
 Sets the animation blending mode this skeleton will use.

Member Function Documentation

DIOGREBone* DigitalSpaces::DIOGRESkeleton::CreateBone ( void   ) 

Creates a brand new Bone owned by this Skeleton.

Remarks:
This method creates an unattached new Bone for this skeleton. Unless this is to be the root bone (there must only be one of these), you must attach it to another Bone in the skeleton using addChild for it to be any use. For this reason you will likely be better off creating child bones using the Bone::createChild method instead, once you have created the root bone.
Note that this method automatically generates a handle for the bone, which you can retrieve using Bone::getHandle. If you wish the new Bone to have a specific handle, use the alternate form of this method which takes a handle as a parameter, although you should note the restrictions.

DIOGREBone* DigitalSpaces::DIOGRESkeleton::CreateBone ( unsigned short  handle  ) 

Creates a brand new Bone owned by this Skeleton.

Remarks:
This method creates an unattached new Bone for this skeleton and assigns it a specific handle. Unless this is to be the root bone (there must only be one of these), you must attach it to another Bone in the skeleton using addChild for it to be any use. For this reason you will likely be better off creating child bones using the Bone::createChild method instead, once you have created the root bone.
Parameters:
handle The handle to give to this new bone - must be unique within this skeleton. You should also ensure that all bone handles are eventually contiguous (this is to simplify their compilation into an indexed array of transformation matrices). For this reason it is advised that you use the simpler createBone method which automatically assigns a sequential handle starting from 0.

DIOGREBone* DigitalSpaces::DIOGRESkeleton::CreateBone ( const char *  name  ) 

Creates a brand new Bone owned by this Skeleton.

Remarks:
This method creates an unattached new Bone for this skeleton and assigns it a specific name. Unless this is to be the root bone (there must only be one of these), you must attach it to another Bone in the skeleton using addChild for it to be any use. For this reason you will likely be better off creating child bones using the Bone::createChild method instead, once you have created the root bone.
Parameters:
name The name to give to this new bone - must be unique within this skeleton. Note that the way OGRE looks up bones is via a numeric handle, so if you name a Bone this way it will be given an automatic sequential handle. The name is just for your convenience, although it is recommended that you only use the handle to retrieve the bone in performance-critical code.

DIOGREBone* DigitalSpaces::DIOGRESkeleton::CreateBone ( const char *  name,
unsigned short  handle 
)

Creates a brand new Bone owned by this Skeleton.

Remarks:
This method creates an unattached new Bone for this skeleton and assigns it a specific name and handle. Unless this is to be the root bone (there must only be one of these), you must attach it to another Bone in the skeleton using addChild for it to be any use. For this reason you will likely be better off creating child bones using the Bone::createChild method instead, once you have created the root bone.
Parameters:
name The name to give to this new bone - must be unique within this skeleton.
handle The handle to give to this new bone - must be unique within this skeleton.

unsigned short DigitalSpaces::DIOGRESkeleton::GetNumBones ( void   ) 

Returns the number of bones in this skeleton.

DIOGREBone* DigitalSpaces::DIOGRESkeleton::GetRootBone ( void   ) 

Gets the root bone of the skeleton: deprecated in favour of getRootBoneIterator.

Remarks:
The system derives the root bone the first time you ask for it. The root bone is the only bone in the skeleton which has no parent. The system locates it by taking the first bone in the list and going up the bone tree until there are no more parents, and saves this top bone as the root. If you are building the skeleton manually using createBone then you must ensure there is only one bone which is not a child of another bone, otherwise your skeleton will not work properly. If you use createBone only once, and then use Bone::createChild from then on, then inherently the first bone you create will by default be the root.

DIOGREBone* DigitalSpaces::DIOGRESkeleton::GetBone ( unsigned short  handle  ) 

Gets a bone by it's handle.

DIOGREBone* DigitalSpaces::DIOGRESkeleton::GetBone ( const char *  name  ) 

Gets a bone by it's name.

void DigitalSpaces::DIOGRESkeleton::SetBindingPose ( void   ) 

Sets the current position / orientation to be the 'binding pose' ie the layout in which bones were originally bound to a mesh.

void DigitalSpaces::DIOGRESkeleton::Reset ( bool  resetManualBones  ) 

Resets the position and orientation of all bones in this skeleton to their original binding position.

Remarks:
A skeleton is bound to a mesh in a binding pose. Bone positions are then modified from this position during animation. This method returns all the bones to their original position and orientation.
Parameters:
resetManualBones If set to true, causes the state of manual bones to be reset too, which is normally not done to allow the manual state to persist even when keyframe animation is applied.

DIOGREAnimation* DigitalSpaces::DIOGRESkeleton::CreateAnimation ( const char *  name,
float  length 
)

Creates a new Animation object for animating this skeleton.

Parameters:
name The name of this animation
length The length of the animation in seconds

void DigitalSpaces::DIOGRESkeleton::RemoveAnimation ( const char *  name  ) 

Returns the named Animation object.

Remarks:
Will pick up animations in linked skeletons (
See also:
addLinkedSkeletonAnimationSource).
Parameters:
name The name of the animation
linker Optional pointer to a pointer to the linked skeleton animation where this is coming from. Removes an Animation from this skeleton.

unsigned short DigitalSpaces::DIOGRESkeleton::GetNumAnimations ( void   ) 

Changes the state of the skeleton to reflect the application of the passed in collection of animations.

Remarks:
Animating a skeleton involves both interpolating between keyframes of a specific animation, and blending between the animations themselves. Calling this method sets the state of the skeleton so that it reflects the combination of all the passed in animations, at the time index specified for each, using the weights specified. Note that the weights between animations do not have to sum to 1.0, because some animations may affect only subsets of the skeleton. If the weights exceed 1.0 for the same area of the skeleton, the movement will just be exaggerated.
Parameters:
Gets the last animation state of this skeleton. Gets the number of animations on this skeleton.

DIOGREAnimation* DigitalSpaces::DIOGRESkeleton::GetAnimation ( unsigned short  index  ) 

Gets a single animation by index.

Remarks:
Will NOT pick up animations in linked skeletons (
See also:
addLinkedSkeletonAnimationSource).

OGRESkeletonAnimationBlendMode DigitalSpaces::DIOGRESkeleton::GetBlendMode (  ) 

Gets the animation blending mode which this skeleton will use.

void DigitalSpaces::DIOGRESkeleton::SetBlendMode ( OGRESkeletonAnimationBlendMode  state  ) 

Sets the animation blending mode this skeleton will use.


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

Generated on Sun Aug 31 17:46:31 2008 for Digital Spaces by  doxygen 1.5.6