OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreSkeletonInstance.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __SkeletonInstance_H__
30 #define __SkeletonInstance_H__
31 
32 #include "OgrePrerequisites.h"
33 #include "OgreSkeleton.h"
34 
35 namespace Ogre {
36 
53  {
54  public:
58  SkeletonInstance(const SkeletonPtr& masterCopy);
60 
62  unsigned short getNumAnimations(void) const;
63 
65  Animation* getAnimation(unsigned short index) const;
67  Animation* _getAnimationImpl(const String& name,
68  const LinkedSkeletonAnimationSource** linker = 0) const;
69 
76  Animation* createAnimation(const String& name, Real length);
77 
79  Animation* getAnimation(const String& name,
80  const LinkedSkeletonAnimationSource** linker = 0) const;
81 
86  void removeAnimation(const String& name);
87 
88 
90  TagPoint* createTagPointOnBone(Bone* bone,
91  const Quaternion &offsetOrientation = Quaternion::IDENTITY,
92  const Vector3 &offsetPosition = Vector3::ZERO);
93 
95  void freeTagPoint(TagPoint* tagPoint);
96 
98  void addLinkedSkeletonAnimationSource(const String& skelName,
99  Real scale = 1.0f);
101  void removeAllLinkedSkeletonAnimationSources(void);
104  getLinkedSkeletonAnimationSourceIterator(void) const;
105 
107  void _initAnimationState(AnimationStateSet* animSet);
108 
110  void _refreshAnimationState(AnimationStateSet* animSet);
111 
113  const String& getName(void) const;
115  ResourceHandle getHandle(void) const;
117  const String& getGroup(void);
118 
119  protected:
122 
124 
134 
143 
145  unsigned short mNextTagPointAutoHandle;
146 
147  void cloneBoneAndChildren(Bone* source, Bone* parent);
150  void loadImpl(void);
153  void unloadImpl(void);
154 
155  };
159 }
160 
161 
162 #endif
163 
Class encapsulating a set of AnimationState objects.
float Real
Software floating point type.
#define _OgreExport
Definition: OgrePlatform.h:233
TagPointList mFreeTagPoints
Free tag point list.
static const Vector3 ZERO
Definition: OgreVector3.h:796
unsigned short mNextTagPointAutoHandle
TagPoint automatic handles.
Implementation of a Quaternion, i.e.
list< TagPoint * >::type TagPointList
static const Quaternion IDENTITY
Concrete IteratorWrapper for const access to the underlying container.
A tagged point on a skeleton, which can be used to attach entities to on specific other entities...
Definition: OgreTagPoint.h:60
Link to another skeleton to share animations.
Definition: OgreSkeleton.h:522
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
TagPointList mActiveTagPoints
Active tag point list.
unsigned long long int ResourceHandle
Definition: OgreResource.h:40
SkeletonPtr mSkeleton
Pointer back to master Skeleton.
Specialisation of SharedPtr to allow SharedPtr to be assigned to SkeletonPtr.
Definition: OgreSkeleton.h:471
_StringBase String
An animation sequence.
Definition: OgreAnimation.h:90
A bone in a skeleton.
Definition: OgreBone.h:51
A collection of Bone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:87
A SkeletonInstance is a single instance of a Skeleton used by a world object.