29 #ifndef __Skeleton_H__
30 #define __Skeleton_H__
57 #define OGRE_MAX_NUM_BONES 256
60 struct LinkedSkeletonAnimationSource;
118 virtual Bone* createBone(
void);
133 virtual Bone* createBone(
unsigned short handle);
160 virtual Bone* createBone(
const String& name,
unsigned short handle);
163 virtual unsigned short getNumBones(
void)
const;
176 virtual Bone* getRootBone(
void)
const;
186 virtual Bone* getBone(
unsigned short handle)
const;
189 virtual Bone* getBone(
const String& name)
const;
192 virtual bool hasBone(
const String& name)
const;
197 virtual void setBindingPose(
void);
208 virtual void reset(
bool resetManualBones =
false);
241 virtual bool hasAnimation(
const String& name)
const;
244 virtual void removeAnimation(
const String& name);
277 virtual void _getBoneMatrices(
Matrix4* pMatrices);
280 virtual unsigned short getNumAnimations(
void)
const;
287 virtual Animation* getAnimation(
unsigned short index)
const;
296 virtual void _updateTransforms(
void);
303 virtual void optimiseAllAnimations(
bool preservingIdentityNodeTracks =
false);
338 virtual void addLinkedSkeletonAnimationSource(
const String& skelName,
341 virtual void removeAllLinkedSkeletonAnimationSources(
void);
349 getLinkedSkeletonAnimationSourceIterator(
void)
const;
352 virtual void _notifyManualBonesDirty(
void);
354 virtual void _notifyManualBoneStateChange(
Bone* bone);
397 virtual void _mergeSkeletonAnimations(
const Skeleton* source,
405 virtual void _buildMapBoneByHandle(
const Skeleton* source,
412 virtual void _buildMapBoneByName(
const Skeleton* source,
447 void deriveRootBone(
void)
const;
450 void _dumpContents(
const String& filename);
458 void unloadImpl(
void);
460 size_t calculateSize(
void)
const;
Class encapsulating a set of AnimationState objects.
set< Bone * >::type BoneSet
SkeletonAnimationBlendMode
Class encapsulating a standard 4x4 homogeneous matrix.
VectorIterator< BoneList > BoneIterator
float Real
Software floating point type.
AnimationList mAnimationsList
vector< ushort >::type BoneHandleMap
Map to translate bone handle from one skeleton to another skeleton.
SkeletonAnimationBlendMode mBlendState
LinkedSkeletonAnimationSource(const String &skelName, Real scl)
BoneList mBoneList
Storage of bones, indexed by bone handle.
LinkedSkeletonAnimationSource(const String &skelName, Real scl, SkeletonPtr skelPtr)
Interface describing a manual resource loader.
BoneList mRootBones
Pointer to root bones (can now have multiple roots)
vector< Bone * >::type BoneList
vector< LinkedSkeletonAnimationSource >::type LinkedSkeletonAnimSourceList
virtual bool getManualBonesDirty(void) const
Have manual bones been modified since the skeleton was last updated?
Animations are applied by calculating a weighted cumulative total.
unsigned short mNextAutoHandle
Bone automatic handles.
SharedPtr< Skeleton > SkeletonPtr
Concrete IteratorWrapper for const access to the underlying container.
map< String, Animation * >::type AnimationList
Storage of animations, lookup by name.
vector< String >::type StringVector
Link to another skeleton to share animations.
Animations are applied by calculating a weighted average of all animations.
ConstVectorIterator< LinkedSkeletonAnimSourceList > LinkedSkeletonAnimSourceIterator
bool mManualBonesDirty
Manual bones dirty?
Abstract class representing a loadable resource (e.g.
unsigned long long int ResourceHandle
LinkedSkeletonAnimSourceList mLinkedSkeletonAnimSourceList
List of references to other skeletons to use animations from.
BoneListByName mBoneListByName
An animation container interface, which allows generic access to sibling animations.
virtual bool hasManualBones(void) const
Are there any manually controlled bones?
map< String, Bone * >::type BoneListByName
Lookup by bone name.
Defines a generic resource handler.
BoneSet mManualBones
Manual bones.
Concrete IteratorWrapper for nonconst access to the underlying container.
A collection of Bone objects used to animate a skinned mesh.
A SkeletonInstance is a single instance of a Skeleton used by a world object.