Go to the documentation of this file.
29 #ifndef __Skeleton_H__
30 #define __Skeleton_H__
57 #define OGRE_MAX_NUM_BONES 256
60 struct LinkedSkeletonAnimationSource;
208 virtual void reset(
bool resetManualBones =
false);
unsigned long long int ResourceHandle
void _dumpContents(const String &filename)
Debugging method.
virtual void _buildMapBoneByName(const Skeleton *source, BoneHandleMap &boneHandleMap) const
Build the bone handle map to use with Skeleton::_mergeSkeletonAnimations.
VectorIterator< BoneList > BoneIterator
vector< LinkedSkeletonAnimationSource >::type LinkedSkeletonAnimSourceList
size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
virtual Animation * getAnimation(const String &name, const LinkedSkeletonAnimationSource **linker) const
Returns the named Animation object.
LinkedSkeletonAnimSourceList mLinkedSkeletonAnimSourceList
List of references to other skeletons to use animations from.
virtual unsigned short getNumAnimations(void) const
Gets the number of animations on this skeleton.
virtual Bone * createBone(const String &name, unsigned short handle)
Creates a brand new Bone owned by this Skeleton.
vector< String >::type StringVector
virtual BoneIterator getBoneIterator(void)
Get an iterator over all the bones in the skeleton.
virtual void removeAllLinkedSkeletonAnimationSources(void)
Remove all links to other skeletons for the purposes of sharing animation.
Concrete IteratorWrapper for nonconst access to the underlying container.
BoneList mRootBones
Pointer to root bones (can now have multiple roots)
ConstVectorIterator< LinkedSkeletonAnimSourceList > LinkedSkeletonAnimSourceIterator
BoneListByName mBoneListByName
map< String, Bone * >::type BoneListByName
Lookup by bone name.
virtual Animation * createAnimation(const String &name, Real length)
Creates a new Animation object for animating this skeleton.
bool mManualBonesDirty
Manual bones dirty?
virtual Animation * getAnimation(const String &name) const
Returns the named Animation object.
virtual bool hasBone(const String &name) const
Returns whether this skeleton contains the named bone.
AnimationList mAnimationsList
virtual void addLinkedSkeletonAnimationSource(const String &skelName, Real scale=1.0f)
Allows you to use the animations from another Skeleton object to animate this skeleton.
virtual bool hasAnimation(const String &name) const
Returns whether this skeleton contains the named animation.
vector< ushort >::type BoneHandleMap
Map to translate bone handle from one skeleton to another skeleton.
virtual Bone * createBone(unsigned short handle)
Creates a brand new Bone owned by this Skeleton.
vector< Bone * >::type BoneList
unsigned short mNextAutoHandle
Bone automatic handles.
virtual SkeletonAnimationBlendMode getBlendMode() const
Gets the animation blending mode which this skeleton will use.
Skeleton(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0)
Constructor, don't call directly, use SkeletonManager.
virtual void _initAnimationState(AnimationStateSet *animSet)
Initialise an animation set suitable for use with this skeleton.
virtual void setBlendMode(SkeletonAnimationBlendMode state)
Sets the animation blending mode this skeleton will use.
@ ANIMBLEND_CUMULATIVE
Animations are applied by calculating a weighted cumulative total.
virtual void _updateTransforms(void)
Updates all the derived transforms in the skeleton.
Class encapsulating a standard 4x4 homogeneous matrix.
SkeletonAnimationBlendMode
virtual void setBindingPose(void)
Sets the current position / orientation to be the 'binding pose' i.e.
@ ANIMBLEND_AVERAGE
Animations are applied by calculating a weighted average of all animations.
Skeleton()
Internal constructor for use by SkeletonInstance only.
virtual void _notifyManualBoneStateChange(Bone *bone)
Internal method for notifying that a bone is manual.
set< Bone * >::type BoneSet
Defines a generic resource handler.
virtual Animation * getAnimation(unsigned short index) const
Gets a single animation by index.
virtual BoneIterator getRootBoneIterator(void)
Get an iterator over the root bones in the skeleton, ie those with no parents.
LinkedSkeletonAnimationSource(const String &skelName, Real scl, SkeletonPtr skelPtr)
virtual void _getBoneMatrices(Matrix4 *pMatrices)
Populates the passed in array with the bone matrices based on the current position.
virtual Animation * _getAnimationImpl(const String &name, const LinkedSkeletonAnimationSource **linker=0) const
Internal accessor for animations (returns null if animation does not exist)
map< String, Animation * >::type AnimationList
Storage of animations, lookup by name.
virtual LinkedSkeletonAnimSourceIterator getLinkedSkeletonAnimationSourceIterator(void) const
Get an iterator over the linked skeletons used as animation sources.
virtual void _notifyManualBonesDirty(void)
Internal method for marking the manual bones as dirty.
Link to another skeleton to share animations.
virtual bool hasManualBones(void) const
Are there any manually controlled bones?
Class encapsulating a set of AnimationState objects.
LinkedSkeletonAnimationSource(const String &skelName, Real scl)
virtual Bone * getBone(unsigned short handle) const
Gets a bone by it's handle.
Abstract class representing a loadable resource (e.g.
A collection of Bone objects used to animate a skinned mesh.
BoneSet mManualBones
Manual bones.
void loadImpl(void)
Internal implementation of the meat of the 'load' action, only called if this resource is not being l...
A SkeletonInstance is a single instance of a Skeleton used by a world object.
virtual void _mergeSkeletonAnimations(const Skeleton *source, const BoneHandleMap &boneHandleMap, const StringVector &animations=StringVector())
Merge animations from another Skeleton object into this skeleton.
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
void deriveRootBone(void) const
Internal method which parses the bones to derive the root bone.
virtual Bone * getRootBone(void) const
Gets the root bone of the skeleton: deprecated in favour of getRootBoneIterator.
virtual void removeAnimation(const String &name)
Removes an Animation from this skeleton.
virtual unsigned short getNumBones(void) const
Returns the number of bones in this skeleton.
virtual void _buildMapBoneByHandle(const Skeleton *source, BoneHandleMap &boneHandleMap) const
Build the bone handle map to use with Skeleton::_mergeSkeletonAnimations.
BoneList mBoneList
Storage of bones, indexed by bone handle.
float Real
Software floating point type.
virtual bool getManualBonesDirty(void) const
Have manual bones been modified since the skeleton was last updated?
virtual void optimiseAllAnimations(bool preservingIdentityNodeTracks=false)
Optimise all of this skeleton's animations.
virtual Bone * createBone(void)
Creates a brand new Bone owned by this Skeleton.
virtual void setAnimationState(const AnimationStateSet &animSet)
Changes the state of the skeleton to reflect the application of the passed in collection of animation...
virtual void _refreshAnimationState(AnimationStateSet *animSet)
Refresh an animation set suitable for use with this skeleton.
SharedPtr< Skeleton > SkeletonPtr
SkeletonAnimationBlendMode mBlendState
Interface describing a manual resource loader.
virtual void reset(bool resetManualBones=false)
Resets the position and orientation of all bones in this skeleton to their original binding position.
Concrete IteratorWrapper for const access to the underlying container.
virtual Bone * getBone(const String &name) const
Gets a bone by it's name.
virtual Bone * createBone(const String &name)
Creates a brand new Bone owned by this Skeleton.
An animation container interface, which allows generic access to sibling animations.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.