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 #include "OgreHeaderPrefix.h"
35 
36 namespace Ogre {
37 
53  class _OgreExport SkeletonInstance : public Skeleton
54  {
55  public:
59  SkeletonInstance(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(Bone* 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(Bone* source, Bone* parent);
151  void loadImpl(void);
154  void unloadImpl(void);
155 
156  };
160 }
161 
162 #include "OgreHeaderSuffix.h"
163 
164 #endif
165 
OgreHeaderSuffix.h
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800
Ogre::TagPoint
A tagged point on a skeleton, which can be used to attach entities to on specific other entities.
Definition: OgreTagPoint.h:60
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::SkeletonInstance::mSkeleton
SkeletonPtr mSkeleton
Pointer back to master Skeleton.
Definition: OgreSkeletonInstance.h:122
Ogre::SkeletonInstance::mNextTagPointAutoHandle
unsigned short mNextTagPointAutoHandle
TagPoint automatic handles.
Definition: OgreSkeletonInstance.h:146
Ogre::SkeletonInstance::mFreeTagPoints
TagPointList mFreeTagPoints
Free tag point list.
Definition: OgreSkeletonInstance.h:143
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:57
OgreHeaderPrefix.h
Ogre::list
Definition: OgrePrerequisites.h:505
Ogre::SkeletonInstance::TagPointList
list< TagPoint * >::type TagPointList
Definition: OgreSkeletonInstance.h:124
OgrePrerequisites.h
Ogre::SkeletonInstance::mActiveTagPoints
TagPointList mActiveTagPoints
Active tag point list.
Definition: OgreSkeletonInstance.h:134
Ogre::Animation
An animation sequence.
Definition: OgreAnimation.h:92
Ogre::SharedPtr< Skeleton >
Ogre::LinkedSkeletonAnimationSource
Link to another skeleton to share animations.
Definition: OgreSkeleton.h:467
Ogre::AnimationStateSet
Class encapsulating a set of AnimationState objects.
Definition: OgreAnimationState.h:196
Ogre::Skeleton
A collection of Bone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:87
Ogre::SkeletonInstance
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Definition: OgreSkeletonInstance.h:53
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Bone
A bone in a skeleton.
Definition: OgreBone.h:51
OgreSkeleton.h
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::ConstVectorIterator
Concrete IteratorWrapper for const access to the underlying container.
Definition: OgreIteratorWrapper.h:217

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15