Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::SkeletonInstance Class Reference

A SkeletonInstance is a single instance of a Skeleton used by a world object. More...

`#include <OgreSkeletonInstance.h>`

Inheritance diagram for Ogre::SkeletonInstance:

[legend]
List of all members.

## Public Types

typedef std::vector< Bone * > | BoneList
typedef VectorIterator< BoneList > | BoneIterator

## Public Methods

| SkeletonInstance (Skeleton *masterCopy)
| Constructor, don't call directly, this will be created automatically when you create an Entity based on a skeletally animated Mesh.
| ~SkeletonInstance ()
unsigned short | getNumAnimations (void) const
| Gets the number of animations on this skeleton.
Animation * | getAnimation (unsigned short index) const
| Gets a single animation by index.
Animation * | createAnimation (const String &name, Real length)
| Creates a new Animation object for animating this skeleton.
Animation * | getAnimation (const String &name) const
| Returns the named Animation object.
void | removeAnimation (const String &name)
| Removes an Animation from this skeleton.
void | load (void)
| Overridden from Skeleton.
void | unload (void)
| Overridden from Skeleton.
TagPoint * | createTagPointOnBone (Bone *bone, const Quaternion &offsetOrientation=Quaternion::IDENTITY, const Vector3 &offsetPosition=Vector3::UNIT_SCALE)
| Creates a TagPoint ready to be attached to a bone.
void | freeTagPoint (TagPoint *tagPoint)
| Frees a TagPoint that already attached to a bone.
virtual Bone * | createBone (void)
| Creates a brand new Bone owned by this Skeleton.
virtual Bone * | createBone (unsigned short handle)
| Creates a brand new Bone owned by this Skeleton.
virtual Bone * | createBone (const String &name)
| Creates a brand new Bone owned by this Skeleton.
virtual Bone * | createBone (const String &name, unsigned short handle)
| Creates a brand new Bone owned by this Skeleton.
virtual unsigned short | getNumBones (void) const
| Returns the number of bones in this skeleton.
virtual Bone * | getRootBone (void) const
| Gets the root bone of the skeleton: deprecated in favour of getRootBoneIterator.
virtual BoneIterator | getRootBoneIterator (void)
| Get an iterator over the root bones in the skeleton, ie those with no parents.
virtual BoneIterator | getBoneIterator (void)
| Get an iterator over all the bones in the skeleton.
virtual Bone * | getBone (unsigned short handle) const
| Gets a bone by it's handle.
virtual Bone * | getBone (const String &name) const
| Gets a bone by it's name.
virtual 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.
virtual void | reset (bool resetManualBones=false)
| Resets the position and orientation of all bones in this skeleton to their original binding position.
virtual void | setAnimationState (const AnimationStateSet &animSet)
| Changes the state of the skeleton to reflect the application of the passed in collection of animations.
virtual const AnimationStateSet & | getAnimationState (void) const
| Gets the last animation state of this skeleton.
virtual void | _initAnimationState (AnimationStateSet *animSet)
| Initialise an animation set suitable for use with this mesh.
virtual void | _getBoneMatrices (Matrix4 *pMatrices)
| Populates the passed in array with the bone matrices based on the current position.
virtual SkeletonAnimationBlendMode | getBlendMode ()
| Gets the animation blending mode which this skeleton will use.
virtual void | setBlendMode (SkeletonAnimationBlendMode state)
| Sets the animation blending mode this skeleton will use.
virtual void | _updateTransforms (void)
| Updates all the derived transforms in the skeleton.
virtual size_t | getSize (void) const
| Retrieves info about the size of the resource.
virtual void | touch (void)
| 'Touches' the resource to indicate it has been used.
time_t | getLastAccess (void) const
| Gets the last time the resource was 'touched'.
const String & | getName (void) const
| Gets resource name.
ResourceHandle | getHandle (void) const
bool | isLoaded (void) const
| Returns true if the Resource has been loaded, false otherwise.
virtual void | destroy ()
| A method to make the resource delete itself.

## Protected Types

typedef std::list< TagPoint * > | ActiveTagPointList
typedef std::deque< TagPoint * > | FreeTagPointQueue
typedef std::map< String, Bone * > | BoneListByName
| Lookup by bone name.
typedef std::map< String, Animation * > | AnimationList
| Storage of animations, lookup by name.

## Protected Methods

void | cloneBoneAndChildren (Bone *source, Bone *parent)
void | deriveRootBone (void) const
| Internal method which parses the bones to derive the root bone.
void | _dumpContents (const String &filename)
| Debugging method.

## Protected Attributes

Skeleton * | mSkeleton
| Pointer back to master Skeleton.
ActiveTagPointList | mActiveTagPoints
| Active tag point list.
FreeTagPointQueue | mFreeTagPoints
| Free tag point queue.
unsigned short | mNextTagPointAutoHandle
| TagPoint automatic handles.
SkeletonAnimationBlendMode | mBlendState
BoneList | mBoneList
| Storage of bones, indexed by bone handle.
BoneListByName | mBoneListByName
BoneList | mRootBones
| Pointer to root bones (can now have multiple roots).
unsigned short | mNextAutoHandle
| Bone automatic handles.
AnimationList | mAnimationsList
AnimationStateSet | mLastAnimationState
| Saved version of last animation.
String | mName
ResourceHandle | mHandle
bool | mIsLoaded
time_t | mLastAccess
size_t | mSize

## Detailed Description

A SkeletonInstance is a single instance of a Skeleton used by a world object.

Remarks:
  The difference between a Skeleton and a SkeletonInstance is that the Skeleton is the 'master' version much like Mesh is a 'master' version of Entity. Many SkeletonInstance objects can be based on a single Skeleton, and are copies of it when created. Any changes made to this are not reflected in the master copy. The exception is animations; these are shared on the Skeleton itself and may not be modified here.

Definition at line 43 of file OgreSkeletonInstance.h.

## Member Typedef Documentation

typedef std::list<TagPoint*> Ogre::SkeletonInstance::ActiveTagPointList`[protected]`

| Definition at line 94 of file OgreSkeletonInstance.h.

typedef std::map<String, Animation*> Ogre::Skeleton::AnimationList`[protected, inherited]`

| Storage of animations, lookup by name. Definition at line 273 of file OgreSkeleton.h.

typedef VectorIterator<BoneList> Ogre::Skeleton::BoneIterator`[inherited]`

| Definition at line 170 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::getBoneIterator(), Ogre::Skeleton::getRootBoneIterator(), and load().

typedef std::vector<Bone*> Ogre::Skeleton::BoneList`[inherited]`

| Definition at line 169 of file OgreSkeleton.h.

typedef std::map<String, Bone*> Ogre::Skeleton::BoneListByName`[protected, inherited]`

| Lookup by bone name. Definition at line 262 of file OgreSkeleton.h.

typedef std::deque<TagPoint*> Ogre::SkeletonInstance::FreeTagPointQueue`[protected]`

| Definition at line 95 of file OgreSkeletonInstance.h.

## Constructor & Destructor Documentation

Ogre::SkeletonInstance::SkeletonInstance | ( | Skeleton * | masterCopy | ) |

| Constructor, don't call directly, this will be created automatically when you create an Entity based on a skeletally animated Mesh. Definition at line 33 of file OgreSkeletonInstance.cpp. References mNextTagPointAutoHandle.

Ogre::SkeletonInstance::~SkeletonInstance | ( |  | ) |

| Definition at line 39 of file OgreSkeletonInstance.cpp. References unload().

## Member Function Documentation

void Ogre::Skeleton::_dumpContents | ( | const String & | filename | ) | `[protected, inherited]`

Debugging method.

Definition at line 455 of file OgreSkeleton.cpp.

References Ogre::AnimationTrack::getAssociatedNode(), Ogre::Bone::getHandle(), Ogre::AnimationTrack::getKeyFrame(), Ogre::Animation::getLength(), Ogre::Animation::getName(), Ogre::AnimationTrack::getNumKeyFrames(), Ogre::Animation::getNumTracks(), Ogre::Node::getOrientation(), Ogre::Node::getPosition(), Ogre::KeyFrame::getRotation(), Ogre::KeyFrame::getTime(), Ogre::Animation::getTrack(), Ogre::KeyFrame::getTranslate(), Ogre::Skeleton::mAnimationsList, Ogre::Skeleton::mBoneList, Ogre::Resource::mName, Ogre::of, Ogre::String, Ogre::Quaternion::ToAngleAxis(), and Ogre::Radian::valueRadians().

void Ogre::Skeleton::_getBoneMatrices | ( | Matrix4 * | pMatrices | ) | `[virtual, inherited]`

Populates the passed in array with the bone matrices based on the current position.

Remarks:
  Internal use only. The array pointed to by the passed in pointer must be at least as large as the number of bones. Assumes animation has already been updated.

Definition at line 364 of file OgreSkeleton.cpp.

References Ogre::Bone::_getBindingPoseInverseTransform(), Ogre::Node::_getFullTransform(), Ogre::Skeleton::_updateTransforms(), and Ogre::Skeleton::mBoneList.

Referenced by Ogre::Entity::cacheBoneMatrices().

void Ogre::Skeleton::_initAnimationState | ( | AnimationStateSet * | animSet | ) | `[virtual, inherited]`

Initialise an animation set suitable for use with this mesh.

Remarks:
  Only recommended for use inside the engine, not by applications.

Definition at line 345 of file OgreSkeleton.cpp.

References Ogre::AnimationStateSet, Ogre::Animation::getLength(), Ogre::Animation::getName(), Ogre::Skeleton::mAnimationsList, and Ogre::String.

Referenced by Ogre::Mesh::_initAnimationState().

void Ogre::Skeleton::_updateTransforms | ( | void |  | ) | `[virtual, inherited]`

| Updates all the derived transforms in the skeleton. Definition at line 546 of file OgreSkeleton.cpp. References Ogre::Skeleton::mRootBones. Referenced by Ogre::Skeleton::_getBoneMatrices(), and Ogre::Skeleton::setBindingPose().

void Ogre::SkeletonInstance::cloneBoneAndChildren | ( | Bone * | source,
|  | Bone * | parent
| ) | `[protected]`

Definition at line 69 of file OgreSkeletonInstance.cpp.

References Ogre::Node::addChild(), Ogre::Skeleton::createBone(), Ogre::Node::getChildIterator(), Ogre::Bone::getHandle(), Ogre::Node::getName(), Ogre::Node::getOrientation(), Ogre::Node::getPosition(), Ogre::Node::getScale(), Ogre::Skeleton::mRootBones, Ogre::Node::setOrientation(), Ogre::Node::setPosition(), and Ogre::Node::setScale().

Referenced by load().

Animation * Ogre::SkeletonInstance::createAnimation | ( | const String & | name,
|  | Real | length
| ) | `[virtual]`

Creates a new Animation object for animating this skeleton.

Remarks:
  This method updates the reference skeleton, not just this instance!

Parameters:

  name | The name of this animation
  length | The length of the animation in seconds

Reimplemented from Ogre::Skeleton.

Definition at line 54 of file OgreSkeletonInstance.cpp.

References Ogre::Skeleton::createAnimation(), mSkeleton, Ogre::Real, and Ogre::String.

Bone * Ogre::Skeleton::createBone | ( | const String & | name,
|  | unsigned short | handle
| ) | `[virtual, inherited]`

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.

Definition at line 163 of file OgreSkeleton.cpp.

References Except, Ogre::Skeleton::mBoneList, Ogre::Skeleton::mBoneListByName, OGRE_MAX_NUM_BONES, and Ogre::String.

Bone * Ogre::Skeleton::createBone | ( | const String & | name | ) | `[virtual, inherited]`

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.

Definition at line 131 of file OgreSkeleton.cpp.

References Ogre::Skeleton::createBone(), Ogre::Skeleton::mNextAutoHandle, and Ogre::String.

Bone * Ogre::Skeleton::createBone | ( | unsigned short | handle | ) | `[virtual, inherited]`

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.

Definition at line 136 of file OgreSkeleton.cpp.

References Except, Ogre::Node::getName(), Ogre::Skeleton::mBoneList, Ogre::Skeleton::mBoneListByName, and OGRE_MAX_NUM_BONES.

Bone * Ogre::Skeleton::createBone | ( | void |  | ) | `[virtual, inherited]`

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.

Definition at line 125 of file OgreSkeleton.cpp.

References Ogre::Skeleton::mNextAutoHandle.

Referenced by cloneBoneAndChildren(), Ogre::Skeleton::createBone(), Ogre::Bone::createChild(), Ogre::Bone::createChildImpl(), and Ogre::SkeletonSerializer::readBone().

TagPoint * Ogre::SkeletonInstance::createTagPointOnBone | ( | Bone * | bone,
|  | const Quaternion & | offsetOrientation = Quaternion::IDENTITY,
|  | const Vector3 & | offsetPosition = Vector3::UNIT_SCALE
| ) |

| Creates a TagPoint ready to be attached to a bone. Definition at line 144 of file OgreSkeletonInstance.cpp. References Ogre::Node::addChild(), mActiveTagPoints, mFreeTagPoints, mNextTagPointAutoHandle, Ogre::Bone::setBindingPose(), Ogre::Node::setOrientation(), Ogre::Node::setPosition(), and Ogre::Node::setScale(). Referenced by Ogre::Entity::attachObjectToBone().

void Ogre::Skeleton::deriveRootBone | ( | void |  | ) | const`[protected, inherited]`

Internal method which parses the bones to derive the root bone.

Remarks:
  Must be const because called in getRootBone but mRootBone is mutable since lazy-updated.

Definition at line 430 of file OgreSkeleton.cpp.

References Except, Ogre::Node::getParent(), Ogre::Skeleton::mBoneList, and Ogre::Skeleton::mRootBones.

Referenced by Ogre::Skeleton::getRootBone(), and Ogre::Skeleton::getRootBoneIterator().

virtual void Ogre::Resource::destroy | ( | void |  | ) | `[virtual, inherited]`

A method to make the resource delete itself.

Note:
  This exists because Resource objects could be created in other processes, and they need to be destroyed in the process that created them.

Definition at line 137 of file OgreResource.h.

void Ogre::SkeletonInstance::freeTagPoint | ( | TagPoint * | tagPoint | ) |

| Frees a TagPoint that already attached to a bone. Definition at line 166 of file OgreSkeletonInstance.cpp. References Ogre::Node::getParent(), mActiveTagPoints, mFreeTagPoints, and Ogre::Node::removeChild(). Referenced by Ogre::Entity::detachObjectImpl().

Animation * Ogre::SkeletonInstance::getAnimation | ( | const String & | name | ) | const`[virtual]`

| Returns the named Animation object. Reimplemented from Ogre::Skeleton. Definition at line 59 of file OgreSkeletonInstance.cpp. References Ogre::Skeleton::getAnimation(), mSkeleton, and Ogre::String.

Animation * Ogre::SkeletonInstance::getAnimation | ( | unsigned short | index | ) | const`[virtual]`

| Gets a single animation by index. Reimplemented from Ogre::Skeleton. Definition at line 49 of file OgreSkeletonInstance.cpp. References Ogre::Skeleton::getAnimation(), and mSkeleton.

const AnimationStateSet & Ogre::Skeleton::getAnimationState | ( | void |  | ) | const`[virtual, inherited]`

| Gets the last animation state of this skeleton. Definition at line 340 of file OgreSkeleton.cpp. References Ogre::AnimationStateSet, and Ogre::Skeleton::mLastAnimationState.

SkeletonAnimationBlendMode Ogre::Skeleton::getBlendMode | ( |  | ) | `[virtual, inherited]`

| Gets the animation blending mode which this skeleton will use. Definition at line 522 of file OgreSkeleton.cpp. References Ogre::Skeleton::mBlendState, and Ogre::SkeletonAnimationBlendMode.

Bone * Ogre::Skeleton::getBone | ( | const String & | name | ) | const`[virtual, inherited]`

| Gets a bone by it's name. Definition at line 416 of file OgreSkeleton.cpp. References Except, Ogre::Skeleton::mBoneListByName, and Ogre::String.

Bone * Ogre::Skeleton::getBone | ( | unsigned short | handle | ) | const`[virtual, inherited]`

| Gets a bone by it's handle. Definition at line 410 of file OgreSkeleton.cpp. References Ogre::Skeleton::mBoneList. Referenced by Ogre::Entity::_updateRenderQueue(), Ogre::Animation::apply(), Ogre::Entity::attachObjectToBone(), Ogre::SkeletonSerializer::readAnimationTrack(), Ogre::SkeletonSerializer::readBoneParent(), and Ogre::SkeletonSerializer::writeSkeleton().

Skeleton::BoneIterator Ogre::Skeleton::getBoneIterator | ( | void |  | ) | `[virtual, inherited]`

| Get an iterator over all the bones in the skeleton. Definition at line 541 of file OgreSkeleton.cpp. References Ogre::Skeleton::BoneIterator, and Ogre::Skeleton::mBoneList.

ResourceHandle Ogre::Resource::getHandle | ( | void |  | ) | const`[inherited]`

| Definition at line 120 of file OgreResource.h. References Ogre::ResourceHandle. Referenced by Ogre::Material::clone(), Ogre::BspLevel::loadQuake3Level(), and Ogre::ResourceManager::unload().

time_t Ogre::Resource::getLastAccess | ( | void |  | ) | const`[inherited]`

| Gets the last time the resource was 'touched'. Definition at line 108 of file OgreResource.h.

const String& Ogre::Resource::getName | ( | void |  | ) | const`[inherited]`

Gets resource name.

Reimplemented in Ogre::Material, and Ogre::Overlay.

Definition at line 115 of file OgreResource.h.

References Ogre::String.

Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::Mesh::_notifySkeleton(), Ogre::ResourceManager::add(), Ogre::PopupMenuGuiElement::addListItem(), Ogre::ListGuiElement::addListItem(), Ogre::PopupMenuGuiElement::addMenuItem(), Ogre::MeshManager::createPrefabPlane(), Ogre::TTYGuiElement::getFontName(), Ogre::TextAreaGuiElement::getFontName(), Ogre::PopupMenuGuiElement::getListItemName(), Ogre::ListGuiElement::getListItemName(), Ogre::GpuProgramUsage::getProgramName(), Ogre::MeshSerializer::importMesh(), Ogre::GLTexture::load(), Ogre::TextureManager::loadImage(), Ogre::TextureManager::loadRawData(), Ogre::FontManager::logBadAttrib(), Ogre::MeshSerializerImpl::readMeshLodInfo(), Ogre::MeshSerializerImpl::readMeshLodUsageGenerated(), Ogre::MeshSerializerImpl::readMeshLodUsageManual(), Ogre::PopupMenuGuiElement::removeListItem(), Ogre::ListGuiElement::removeListItem(), Ogre::SceneManager::setSkyBox(), Ogre::SceneManager::setSkyDome(), and Ogre::ResourceManager::unload().

unsigned short Ogre::SkeletonInstance::getNumAnimations | ( | void |  | ) | const`[virtual]`

| Gets the number of animations on this skeleton. Reimplemented from Ogre::Skeleton. Definition at line 44 of file OgreSkeletonInstance.cpp. References Ogre::Skeleton::getNumAnimations(), and mSkeleton.

unsigned short Ogre::Skeleton::getNumBones | ( | void |  | ) | const`[virtual, inherited]`

| Returns the number of bones in this skeleton. Definition at line 359 of file OgreSkeleton.cpp. References Ogre::Skeleton::mBoneList. Referenced by Ogre::Entity::_updateRenderQueue(), Ogre::Entity::cacheBoneMatrices(), Ogre::Entity::Entity(), and Ogre::SkeletonSerializer::writeSkeleton().

Bone * Ogre::Skeleton::getRootBone | ( | void |  | ) | const`[virtual, inherited]`

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.

Definition at line 199 of file OgreSkeleton.cpp.

References Ogre::Skeleton::deriveRootBone(), and Ogre::Skeleton::mRootBones.

Skeleton::BoneIterator Ogre::Skeleton::getRootBoneIterator | ( | void |  | ) | `[virtual, inherited]`

| Get an iterator over the root bones in the skeleton, ie those with no parents. Definition at line 532 of file OgreSkeleton.cpp. References Ogre::Skeleton::BoneIterator, Ogre::Skeleton::deriveRootBone(), and Ogre::Skeleton::mRootBones. Referenced by load().

virtual size_t Ogre::Resource::getSize | ( | void |  | ) | const`[virtual, inherited]`

| Retrieves info about the size of the resource. Definition at line 93 of file OgreResource.h. Referenced by Ogre::ResourceManager::unload().

bool Ogre::Resource::isLoaded | ( | void |  | ) | const`[inherited]`

| Returns true if the Resource has been loaded, false otherwise. Definition at line 127 of file OgreResource.h. Referenced by Ogre::GpuProgramUsage::_load(), Ogre::SceneManager::deriveShadowCasterPass(), Ogre::SceneManager::deriveShadowReceiverPass(), Ogre::Technique::isLoaded(), Ogre::D3D9Texture::load(), Ogre::D3D9Texture::unload(), and Ogre::D3D9Texture::~D3D9Texture().

void Ogre::SkeletonInstance::load | ( | void |  | ) | `[virtual]`

Overridden from Skeleton.

Reimplemented from Ogre::Skeleton.

Definition at line 100 of file OgreSkeletonInstance.cpp.

References Ogre::Node::_update(), Ogre::Skeleton::BoneIterator, cloneBoneAndChildren(), Ogre::Skeleton::getRootBoneIterator(), Ogre::Skeleton::mBlendState, Ogre::Resource::mIsLoaded, Ogre::Skeleton::mNextAutoHandle, mNextTagPointAutoHandle, mSkeleton, and Ogre::Skeleton::setBindingPose().

Referenced by Ogre::Entity::Entity().

void Ogre::SkeletonInstance::removeAnimation | ( | const String & | name | ) | `[virtual]`

Removes an Animation from this skeleton.

Remarks:
  This method updates the reference skeleton, not just this instance!

Reimplemented from Ogre::Skeleton.

Definition at line 64 of file OgreSkeletonInstance.cpp.

References mSkeleton, Ogre::Skeleton::removeAnimation(), and Ogre::String.

void Ogre::Skeleton::reset | ( | bool | resetManualBones = false | ) | `[virtual, inherited]`

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.

Definition at line 278 of file OgreSkeleton.cpp.

References Ogre::Skeleton::mBoneList.

Referenced by Ogre::Skeleton::setAnimationState().

void Ogre::Skeleton::setAnimationState | ( | const AnimationStateSet & | animSet | ) | `[virtual, inherited]`

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:

Definition at line 209 of file OgreSkeleton.cpp.

References Ogre::AnimationStateSet, Ogre::ANIMBLEND_CUMULATIVE, Ogre::Animation::apply(), Ogre::Skeleton::getAnimation(), Ogre::AnimationState::getAnimationName(), Ogre::AnimationState::getEnabled(), Ogre::AnimationState::getTimePosition(), Ogre::AnimationState::getWeight(), Ogre::Skeleton::mBlendState, Ogre::Skeleton::mLastAnimationState, and Ogre::Skeleton::reset().

Referenced by Ogre::Entity::cacheBoneMatrices().

void Ogre::Skeleton::setBindingPose | ( | void |  | ) | `[virtual, inherited]`

| Sets the current position / orientation to be the 'binding pose' ie the layout in which bones were originally bound to a mesh. Definition at line 265 of file OgreSkeleton.cpp. References Ogre::Skeleton::_updateTransforms(), and Ogre::Skeleton::mBoneList. Referenced by Ogre::SkeletonSerializer::importSkeleton(), and load().

void Ogre::Skeleton::setBlendMode | ( | SkeletonAnimationBlendMode | state | ) | `[virtual, inherited]`

| Sets the animation blending mode this skeleton will use. Definition at line 527 of file OgreSkeleton.cpp. References Ogre::Skeleton::mBlendState, and Ogre::SkeletonAnimationBlendMode.

virtual void Ogre::Resource::touch | ( | void |  | ) | `[virtual, inherited]`

| 'Touches' the resource to indicate it has been used. Reimplemented in Ogre::Material. Definition at line 100 of file OgreResource.h. Referenced by Ogre::Mesh::clone(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), and Ogre::ResourceManager::load().

void Ogre::SkeletonInstance::unload | ( | void |  | ) | `[virtual]`

| Overridden from Skeleton. Reimplemented from Ogre::Skeleton. Definition at line 120 of file OgreSkeletonInstance.cpp. References mActiveTagPoints, and mFreeTagPoints. Referenced by ~SkeletonInstance().

## Member Data Documentation

ActiveTagPointList Ogre::SkeletonInstance::mActiveTagPoints`[protected]`

Active tag point list.

Remarks:
  This is a linked list of pointers to actived tag point

  This allows very fast instertions and deletions from anywhere in the list to activate / deactivate tag points (required for weapon / equip systems etc) as well as resuse of TagPoint instances without construction & destruction which avoids memory thrashing.

Definition at line 105 of file OgreSkeletonInstance.h.

Referenced by createTagPointOnBone(), freeTagPoint(), and unload().

AnimationList Ogre::Skeleton::mAnimationsList`[protected, inherited]`

| Definition at line 274 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::_dumpContents(), Ogre::Skeleton::_initAnimationState(), Ogre::Skeleton::createAnimation(), Ogre::Skeleton::getAnimation(), Ogre::Skeleton::getNumAnimations(), Ogre::Skeleton::removeAnimation(), and Ogre::Skeleton::unload().

SkeletonAnimationBlendMode Ogre::Skeleton::mBlendState`[protected, inherited]`

| Definition at line 258 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::getBlendMode(), load(), Ogre::Skeleton::setAnimationState(), Ogre::Skeleton::setBlendMode(), and Ogre::Skeleton::Skeleton().

BoneList Ogre::Skeleton::mBoneList`[protected, inherited]`

Storage of bones, indexed by bone handle.

Definition at line 260 of file OgreSkeleton.h.

Referenced by Ogre::Skeleton::_dumpContents(), Ogre::Skeleton::_getBoneMatrices(), Ogre::Skeleton::createBone(), Ogre::Skeleton::deriveRootBone(), Ogre::Skeleton::getBone(), Ogre::Skeleton::getBoneIterator(), Ogre::Skeleton::getNumBones(), Ogre::Skeleton::reset(), Ogre::Skeleton::setBindingPose(), and Ogre::Skeleton::unload().

BoneListByName Ogre::Skeleton::mBoneListByName`[protected, inherited]`

| Definition at line 263 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::createBone(), Ogre::Skeleton::getBone(), and Ogre::Skeleton::unload().

FreeTagPointQueue Ogre::SkeletonInstance::mFreeTagPoints`[protected]`

Free tag point queue.

Remarks:
  This contains a list of the tag points free for use as new instances as required by the set. When a TagPoint instances are deactived, there will are referenced on this deque. As they get used this deque reduces, as they get released back to to the set they get added back to the deque.

Definition at line 114 of file OgreSkeletonInstance.h.

Referenced by createTagPointOnBone(), freeTagPoint(), and unload().

ResourceHandle Ogre::Resource::mHandle`[protected, inherited]`

| Definition at line 57 of file OgreResource.h. Referenced by Ogre::ResourceManager::add(), Ogre::Material::clone(), Ogre::Material::copyDetailsTo(), and Ogre::Material::operator=().

bool Ogre::Resource::mIsLoaded`[protected, inherited]`

Definition at line 58 of file OgreResource.h.

Referenced by Ogre::D3D9Texture::_initMembers(), Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3D9Texture::_loadNormTex(), Ogre::D3D9Texture::_loadVolumeTex(), Ogre::Material::_notifyNeedsRecompile(), Ogre::Material::clone(), Ogre::D3DTexture::createSurface2D(), Ogre::D3DTexture::createSurface3D(), Ogre::D3D9Texture::D3D9Texture(), Ogre::D3DTexture::D3DTexture(), Ogre::DynLib::DynLib(), Ogre::Zip::load(), load(), Ogre::Skeleton::load(), Ogre::PatchMesh::load(), Ogre::Mesh::load(), Ogre::Material::load(), Ogre::HighLevelGpuProgram::load(), Ogre::GpuProgram::load(), Ogre::GLTexture::load(), Ogre::GLSLGpuProgram::load(), Ogre::Font::load(), Ogre::DynLib::load(), Ogre::D3D9Texture::load(), Ogre::D3D9GpuProgram::load(), Ogre::D3DTexture::load(), Ogre::BspLevel::load(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), Ogre::Material::Material(), Ogre::Material::operator=(), Ogre::Skeleton::unload(), Ogre::Mesh::unload(), Ogre::Material::unload(), Ogre::HighLevelGpuProgram::unload(), Ogre::GLTexture::unload(), Ogre::Font::unload(), Ogre::DynLib::unload(), Ogre::D3D9Texture::unload(), Ogre::D3DTexture::unload(), and Ogre::BspLevel::~BspLevel().

time_t Ogre::Resource::mLastAccess`[protected, inherited]`

| Definition at line 59 of file OgreResource.h. Referenced by Ogre::Material::operator=().

AnimationStateSet Ogre::Skeleton::mLastAnimationState`[protected, inherited]`

| Saved version of last animation. Definition at line 278 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::createAnimation(), Ogre::Skeleton::getAnimationState(), and Ogre::Skeleton::setAnimationState().

String Ogre::Resource::mName`[protected, inherited]`

Definition at line 56 of file OgreResource.h.

Referenced by Ogre::Skeleton::_dumpContents(), Ogre::Mesh::_rationaliseBoneAssignments(), Ogre::GLSLProgram::attachToProgramObject(), Ogre::BspLevel::BspLevel(), Ogre::Mesh::buildEdgeList(), Ogre::Mesh::buildTangentVectors(), Ogre::Material::clone(), Ogre::Material::compile(), Ogre::GLSLProgram::compile(), Ogre::Material::copyDetailsTo(), Ogre::Quake3Shader::createAsMaterial(), Ogre::D3D9HLSLProgram::createLowLevelImpl(), Ogre::CgProgram::createLowLevelImpl(), Ogre::Font::createTextureFromFont(), Ogre::D3D9Texture::D3D9Texture(), Ogre::D3DTexture::D3DTexture(), Ogre::DynLib::DynLib(), Ogre::Font::Font(), Ogre::Mesh::generateLodLevels(), Ogre::Material::getBestTechnique(), Ogre::Overlay::getName(), Ogre::Material::getName(), Ogre::GLTexture::GLTexture(), Ogre::GpuProgram::GpuProgram(), Ogre::Zip::load(), Ogre::Skeleton::load(), Ogre::Mesh::load(), Ogre::GLTexture::load(), Ogre::Font::load(), Ogre::DynLib::load(), Ogre::D3DTexture::load(), Ogre::BspLevel::load(), Ogre::D3D9GpuFragmentProgram::loadFromMicrocode(), Ogre::D3D9GpuVertexProgram::loadFromMicrocode(), Ogre::GLSLProgram::loadFromSource(), Ogre::GLArbGpuProgram::loadFromSource(), Ogre::D3D9HLSLProgram::loadFromSource(), Ogre::D3D9GpuProgram::loadFromSource(), Ogre::CgProgram::loadFromSource(), Ogre::GLTexture::loadImages(), Ogre::Material::Material(), Ogre::Mesh::Mesh(), Ogre::Material::operator=(), Ogre::Overlay::Overlay(), Ogre::Quake3Shader::Quake3Shader(), Ogre::CgProgram::selectProfile(), Ogre::Mesh::setSkeletonName(), Ogre::Skeleton::Skeleton(), Ogre::StringResource::StringResource(), Ogre::Texture::Texture(), Ogre::Zip::unload(), Ogre::DynLib::unload(), Ogre::CgProgram::unloadImpl(), and Ogre::Zip::Zip().

unsigned short Ogre::Skeleton::mNextAutoHandle`[protected, inherited]`

| Bone automatic handles. Definition at line 269 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::createBone(), load(), and Ogre::Skeleton::Skeleton().

unsigned short Ogre::SkeletonInstance::mNextTagPointAutoHandle`[protected]`

| TagPoint automatic handles. Definition at line 117 of file OgreSkeletonInstance.h. Referenced by createTagPointOnBone(), load(), and SkeletonInstance().

BoneList Ogre::Skeleton::mRootBones`[protected, inherited]`

| Pointer to root bones (can now have multiple roots). Definition at line 267 of file OgreSkeleton.h. Referenced by Ogre::Skeleton::_updateTransforms(), cloneBoneAndChildren(), Ogre::Skeleton::deriveRootBone(), Ogre::Skeleton::getRootBone(), and Ogre::Skeleton::getRootBoneIterator().

size_t Ogre::Resource::mSize`[protected, inherited]`

| Definition at line 60 of file OgreResource.h. Referenced by Ogre::D3D9Texture::_setFinalAttributes(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::Material::operator=().

Skeleton* Ogre::SkeletonInstance::mSkeleton`[protected]`

| Pointer back to master Skeleton. Definition at line 92 of file OgreSkeletonInstance.h. Referenced by createAnimation(), getAnimation(), getNumAnimations(), load(), and removeAnimation().

The documentation for this class was generated from the following files:

- OgreSkeletonInstance.h
- OgreSkeletonInstance.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:40 2004