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);
278 virtual void _getBoneMatrices(
Matrix4* pMatrices);
281 virtual unsigned short getNumAnimations(
void)
const;
288 virtual Animation* getAnimation(
unsigned short index)
const;
297 virtual void _updateTransforms(
void);
304 virtual void optimiseAllAnimations(
bool preservingIdentityNodeTracks =
false);
339 virtual void addLinkedSkeletonAnimationSource(
const String& skelName,
342 virtual void removeAllLinkedSkeletonAnimationSources(
void);
350 getLinkedSkeletonAnimationSourceIterator(
void)
const;
353 virtual void _notifyManualBonesDirty(
void);
355 virtual void _notifyManualBoneStateChange(
Bone* bone);
398 virtual void _mergeSkeletonAnimations(
const Skeleton* source,
406 virtual void _buildMapBoneByHandle(
const Skeleton* source,
413 virtual void _buildMapBoneByName(
const Skeleton* source,
448 void deriveRootBone(
void)
const;
451 void _dumpContents(
const String& filename);
459 void unloadImpl(
void);
496 if (pRep == static_cast<Skeleton*>(r.
getPointer()))
514 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
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.
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.