OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreOldSkeletonInstance.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-2014 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 #include "OgreHeaderPrefix.h"
35 
36 namespace Ogre {
37 
54  {
55  public:
59  OldSkeletonInstance(const SkeletonPtr& masterCopy);
61 
63  unsigned short getNumAnimations(void) const;
64 
66  Animation* getAnimation(unsigned short index) const;
68  Animation* _getAnimationImpl(const String& name,
69  const LinkedSkeletonAnimationSource** linker = 0) const;
70 
77  Animation* createAnimation(const String& name, Real length);
78 
80  Animation* getAnimation(const String& name,
81  const LinkedSkeletonAnimationSource** linker = 0) const;
82 
87  void removeAnimation(const String& name);
88 
89 
91  TagPoint* createTagPointOnBone(OldBone* bone,
92  const Quaternion &offsetOrientation = Quaternion::IDENTITY,
93  const Vector3 &offsetPosition = Vector3::ZERO);
94 
96  void freeTagPoint(TagPoint* tagPoint);
97 
99  void addLinkedSkeletonAnimationSource(const String& skelName,
100  Real scale = 1.0f);
102  void removeAllLinkedSkeletonAnimationSources(void);
105  getLinkedSkeletonAnimationSourceIterator(void) const;
106 
108  void _initAnimationState(AnimationStateSet* animSet);
109 
111  void _refreshAnimationState(AnimationStateSet* animSet);
112 
114  const String& getName(void) const;
116  ResourceHandle getHandle(void) const;
118  const String& getGroup(void);
119 
120  protected:
123 
125 
135 
144 
146  unsigned short mNextTagPointAutoHandle;
147 
148  void cloneBoneAndChildren(OldBone* source, OldBone* parent);
151  void loadImpl(void);
154  void unloadImpl(void);
155 
156  };
160 }
161 
162 #include "OgreHeaderSuffix.h"
163 
164 #endif
165 
Class encapsulating a set of AnimationState objects.
float Real
Software floating point type.
#define _OgreExport
Definition: OgrePlatform.h:255
SkeletonPtr mSkeleton
Pointer back to master Skeleton.
TagPointList mActiveTagPoints
Active tag point list.
list< TagPoint * >::type TagPointList
static const Vector3 ZERO
Definition: OgreVector3.h:807
Implementation of a Quaternion, i.e.
static const Quaternion IDENTITY
TagPointList mFreeTagPoints
Free tag point list.
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:464
A bone in a skeleton.
Definition: OgreOldBone.h:51
Standard 3-dimensional vector.
Definition: OgreVector3.h:50
unsigned long long int ResourceHandle
Definition: OgreResource.h:39
_StringBase String
Definition: OgreCommon.h:53
A OldSkeletonInstance is a single instance of a Skeleton used by a world object.
An animation sequence.
Definition: OgreAnimation.h:90
unsigned short mNextTagPointAutoHandle
TagPoint automatic handles.
A collection of OldBone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:84