29 #ifndef __Skeleton_H__
30 #define __Skeleton_H__
55 #define OGRE_MAX_NUM_BONES 256
58 struct LinkedSkeletonAnimationSource;
116 virtual Bone* createBone(
void);
131 virtual Bone* createBone(
unsigned short handle);
158 virtual Bone* createBone(
const String& name,
unsigned short handle);
161 virtual unsigned short getNumBones(
void)
const;
174 virtual Bone* getRootBone(
void)
const;
184 virtual Bone* getBone(
unsigned short handle)
const;
187 virtual Bone* getBone(
const String& name)
const;
190 virtual bool hasBone(
const String& name)
const;
195 virtual void setBindingPose(
void);
206 virtual void reset(
bool resetManualBones =
false);
231 virtual bool hasAnimation(
const String& name);
234 virtual void removeAnimation(
const String& name);
268 virtual void _getBoneMatrices(
Matrix4* pMatrices);
271 virtual unsigned short getNumAnimations(
void)
const;
278 virtual Animation* getAnimation(
unsigned short index)
const;
287 virtual void _updateTransforms(
void);
294 virtual void optimiseAllAnimations(
bool preservingIdentityNodeTracks =
false);
329 virtual void addLinkedSkeletonAnimationSource(
const String& skelName,
332 virtual void removeAllLinkedSkeletonAnimationSources(
void);
340 getLinkedSkeletonAnimationSourceIterator(
void)
const;
343 virtual void _notifyManualBonesDirty(
void);
345 virtual void _notifyManualBoneStateChange(
Bone* bone);
388 virtual void _mergeSkeletonAnimations(
const Skeleton* source,
396 virtual void _buildMapBoneByHandle(
const Skeleton* source,
403 virtual void _buildMapBoneByName(
const Skeleton* source,
438 void deriveRootBone(
void)
const;
441 void _dumpContents(
const String& filename);
449 void unloadImpl(
void);
486 if (pRep == static_cast<Skeleton*>(r.
getPointer()))
504 assert(r.
isNull() &&
"RHS must be null if it has no mutex!");
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.
SkeletonPtr & operator=(const ResourcePtr &r)
Operator used to convert a ResourcePtr to a SkeletonPtr.
AnimationList mAnimationsList
#define OGRE_MUTEX_CONDITIONAL(name)
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)
SkeletonPtr(const ResourcePtr &r)
SkeletonPtr(const SkeletonPtr &r)
vector< Bone * >::type BoneList
SkeletonPtr(Skeleton *rep)
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.
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.
#define OGRE_LOCK_MUTEX(name)
BoneListByName mBoneListByName
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.
unsigned int * useCountPointer() const
Specialisation of SharedPtr to allow SharedPtr to be assigned to SkeletonPtr.
Reference-counted shared pointer, used for objects where implicit destruction is required.
BoneSet mManualBones
Manual bones.
size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
Concrete IteratorWrapper for nonconst access to the underlying container.
A collection of Bone objects used to animate a skinned mesh.
#define OGRE_COPY_AUTO_SHARED_MUTEX(from)
A SkeletonInstance is a single instance of a Skeleton used by a world object.