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 
54  {
55  public:
59  SkeletonInstance(const SkeletonPtr& masterCopy);
61 
63  unsigned short getNumAnimations(void) const;
64 
66  Animation* getAnimation(unsigned short index) const;
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 
92  const Quaternion &offsetOrientation = Quaternion::IDENTITY,
93  const Vector3 &offsetPosition = Vector3::ZERO);
94 
96  void freeTagPoint(TagPoint* tagPoint);
97 
100  Real scale = 1.0f);
106 
109 
112 
114  const String& getName(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::SkeletonInstance::_getAnimationImpl
Animation * _getAnimationImpl(const String &name, const LinkedSkeletonAnimationSource **linker=0) const
Internal accessor for animations (returns null if animation does not exist)
Ogre::SkeletonInstance::getLinkedSkeletonAnimationSourceIterator
LinkedSkeletonAnimSourceIterator getLinkedSkeletonAnimationSourceIterator(void) const
Get an iterator over the linked skeletons used as animation sources.
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800
Ogre::SkeletonInstance::getNumAnimations
unsigned short getNumAnimations(void) const
Gets the number of animations on this skeleton.
Ogre::SkeletonInstance::getName
const String & getName(void) const
Gets resource name.
Ogre::SkeletonInstance::unloadImpl
void unloadImpl(void)
Overridden from Skeleton.
Ogre::TagPoint
A tagged point on a skeleton, which can be used to attach entities to on specific other entities.
Definition: OgreTagPoint.h:61
Ogre::SkeletonInstance::~SkeletonInstance
~SkeletonInstance()
Ogre::SkeletonInstance::_refreshAnimationState
void _refreshAnimationState(AnimationStateSet *animSet)
Refresh an animation set suitable for use with this skeleton.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::SkeletonInstance::_initAnimationState
void _initAnimationState(AnimationStateSet *animSet)
Initialise an animation set suitable for use with this skeleton.
Ogre::SkeletonInstance::mSkeleton
SkeletonPtr mSkeleton
Pointer back to master Skeleton.
Definition: OgreSkeletonInstance.h:122
Ogre::SkeletonInstance::addLinkedSkeletonAnimationSource
void addLinkedSkeletonAnimationSource(const String &skelName, Real scale=1.0f)
Allows you to use the animations from another Skeleton object to animate this skeleton.
Ogre::SkeletonInstance::createAnimation
Animation * createAnimation(const String &name, Real length)
Creates a new Animation object for animating this skeleton.
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:58
Ogre::SkeletonInstance::createTagPointOnBone
TagPoint * createTagPointOnBone(Bone *bone, const Quaternion &offsetOrientation=Quaternion::IDENTITY, const Vector3 &offsetPosition=Vector3::ZERO)
Creates a TagPoint ready to be attached to a bone.
Ogre::SkeletonInstance::loadImpl
void loadImpl(void)
Overridden from Skeleton.
OgreHeaderPrefix.h
Ogre::SkeletonInstance::removeAnimation
void removeAnimation(const String &name)
Removes an Animation from this skeleton.
Ogre::list
Definition: OgrePrerequisites.h:506
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::SkeletonInstance::getGroup
const String & getGroup(void)
Gets the group which this resource is a member of.
Ogre::SkeletonInstance::SkeletonInstance
SkeletonInstance(const SkeletonPtr &masterCopy)
Constructor, don't call directly, this will be created automatically when you create an Entity based ...
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Animation
An animation sequence.
Definition: OgreAnimation.h:93
Ogre::SkeletonInstance::getHandle
ResourceHandle getHandle(void) const
Ogre::SkeletonInstance::getAnimation
Animation * getAnimation(const String &name, const LinkedSkeletonAnimationSource **linker=0) const
Returns the named Animation object.
Ogre::SharedPtr< Skeleton >
Ogre::LinkedSkeletonAnimationSource
Link to another skeleton to share animations.
Definition: OgreSkeleton.h:468
Ogre::AnimationStateSet
Class encapsulating a set of AnimationState objects.
Definition: OgreAnimationState.h:197
Ogre::SkeletonInstance::cloneBoneAndChildren
void cloneBoneAndChildren(Bone *source, Bone *parent)
Ogre::Skeleton
A collection of Bone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:88
Ogre::SkeletonInstance
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Definition: OgreSkeletonInstance.h:54
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::SkeletonInstance::getAnimation
Animation * getAnimation(unsigned short index) const
Gets a single animation by index.
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::SkeletonInstance::freeTagPoint
void freeTagPoint(TagPoint *tagPoint)
Frees a TagPoint that already attached to a bone.
Ogre::SkeletonInstance::removeAllLinkedSkeletonAnimationSources
void removeAllLinkedSkeletonAnimationSources(void)
Remove all links to other skeletons for the purposes of sharing animation.
Ogre::Bone
A bone in a skeleton.
Definition: OgreBone.h:52
OgreSkeleton.h
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
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.