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;
181 virtual BoneIterator getRootBoneIterator(
void);
183 virtual BoneIterator getBoneIterator(
void);
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,
398 const BoneHandleMap& boneHandleMap,
405 virtual void _buildMapBoneByHandle(
const Skeleton* source,
406 BoneHandleMap& boneHandleMap)
const;
412 virtual void _buildMapBoneByName(
const Skeleton* source,
413 BoneHandleMap& boneHandleMap)
const;
447 void deriveRootBone(
void)
const;
450 void _dumpContents(
const String& filename);
458 void unloadImpl(
void);
460 size_t calculateSize(
void)
const;
473 : skeletonName(skelName), scale(scl) {}
476 : skeletonName(skelName), pSkeleton(skelPtr), scale(scl) {}
Link to another skeleton to share animations.
Concrete IteratorWrapper for nonconst access to the underlying container.
BoneList mBoneList
Storage of bones, indexed by bone handle.
Animations are applied by calculating a weighted cumulative total.
unsigned short mNextAutoHandle
Bone automatic handles.
BoneListByName mBoneListByName
vector< LinkedSkeletonAnimationSource >::type LinkedSkeletonAnimSourceList
map< String, Bone * >::type BoneListByName
Lookup by bone name.
virtual bool hasManualBones(void) const
Are there any manually controlled bones?
Animations are applied by calculating a weighted average of all animations.
float Real
Software floating point type.
vector< String >::type StringVector
Abstract class representing a loadable resource (e.g.
A collection of Bone objects used to animate a skinned mesh.
Interface describing a manual resource loader.
unsigned long long int ResourceHandle
SkeletonAnimationBlendMode
AnimationList mAnimationsList
An animation container interface, which allows generic access to sibling animations.
Class encapsulating a set of AnimationState objects.
bool mManualBonesDirty
Manual bones dirty?
Class encapsulating a standard 4x4 homogeneous matrix.
map< String, Animation * >::type AnimationList
Storage of animations, lookup by name.
ConstVectorIterator< LinkedSkeletonAnimSourceList > LinkedSkeletonAnimSourceIterator
SkeletonAnimationBlendMode mBlendState
BoneList mRootBones
Pointer to root bones (can now have multiple roots)
A SkeletonInstance is a single instance of a Skeleton used by a world object.
vector< Bone * >::type BoneList
VectorIterator< BoneList > BoneIterator
BoneSet mManualBones
Manual bones.
Defines a generic resource handler.
virtual bool getManualBonesDirty(void) const
Have manual bones been modified since the skeleton was last updated?
vector< ushort >::type BoneHandleMap
Map to translate bone handle from one skeleton to another skeleton.
set< Bone * >::type BoneSet
LinkedSkeletonAnimationSource(const String &skelName, Real scl, SkeletonPtr skelPtr)
Concrete IteratorWrapper for const access to the underlying container.
LinkedSkeletonAnimationSource(const String &skelName, Real scl)
SharedPtr< Skeleton > SkeletonPtr
LinkedSkeletonAnimSourceList mLinkedSkeletonAnimSourceList
List of references to other skeletons to use animations from.