OgreSkeletonInstance.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __SkeletonInstance_H__
#define __SkeletonInstance_H__
#include "OgrePrerequisites.h"
#include "OgreSkeleton.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport SkeletonInstance : public Skeleton
{
public:
SkeletonInstance(const SkeletonPtr& masterCopy);
~SkeletonInstance();
unsigned short getNumAnimations(void) const;
Animation* getAnimation(unsigned short index) const;
Animation* _getAnimationImpl(const String& name,
const LinkedSkeletonAnimationSource** linker = 0) const;
Animation* createAnimation(const String& name, Real length);
Animation* getAnimation(const String& name,
const LinkedSkeletonAnimationSource** linker = 0) const;
void removeAnimation(const String& name);
TagPoint* createTagPointOnBone(Bone* bone,
const Quaternion &offsetOrientation = Quaternion::IDENTITY,
const Vector3 &offsetPosition = Vector3::ZERO);
void freeTagPoint(TagPoint* tagPoint);
void addLinkedSkeletonAnimationSource(const String& skelName,
Real scale = 1.0f);
void removeAllLinkedSkeletonAnimationSources(void);
LinkedSkeletonAnimSourceIterator
getLinkedSkeletonAnimationSourceIterator(void) const;
void _initAnimationState(AnimationStateSet* animSet);
void _refreshAnimationState(AnimationStateSet* animSet);
const String& getName(void) const;
ResourceHandle getHandle(void) const;
const String& getGroup(void);
protected:
SkeletonPtr mSkeleton;
typedef list<TagPoint*>::type TagPointList;
TagPointList mActiveTagPoints;
TagPointList mFreeTagPoints;
unsigned short mNextTagPointAutoHandle;
void cloneBoneAndChildren(Bone* source, Bone* parent);
void loadImpl(void);
void unloadImpl(void);
};
}
#include "OgreHeaderSuffix.h"
#endif
OgreSkeleton.h
Ogre::LinkedSkeletonAnimationSource
Link to another skeleton to share animations.
Definition: OgreSkeleton.h:467
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::list
Definition: OgrePrerequisites.h:505
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:57
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Skeleton
A collection of Bone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:87
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre::SkeletonInstance::mNextTagPointAutoHandle
unsigned short mNextTagPointAutoHandle
TagPoint automatic handles.
Definition: OgreSkeletonInstance.h:146
Ogre::AnimationStateSet
Class encapsulating a set of AnimationState objects.
Definition: OgreAnimationState.h:196
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::SkeletonInstance::TagPointList
list< TagPoint * >::type TagPointList
Definition: OgreSkeletonInstance.h:124
OgrePrerequisites.h
Ogre::SkeletonInstance::mSkeleton
SkeletonPtr mSkeleton
Pointer back to master Skeleton.
Definition: OgreSkeletonInstance.h:122
Ogre::SkeletonInstance
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Definition: OgreSkeletonInstance.h:53
Ogre::Bone
A bone in a skeleton.
Definition: OgreBone.h:51
Ogre::Animation
An animation sequence.
Definition: OgreAnimation.h:92
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
OgreHeaderSuffix.h
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
Definition: OgreAndroidLogListener.h:34
Ogre::SharedPtr< Skeleton >
Ogre::ConstVectorIterator
Concrete IteratorWrapper for const access to the underlying container.
Definition: OgreIteratorWrapper.h:217
OgreHeaderPrefix.h
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::SkeletonInstance::mFreeTagPoints
TagPointList mFreeTagPoints
Free tag point list.
Definition: OgreSkeletonInstance.h:143
Ogre::SkeletonInstance::mActiveTagPoints
TagPointList mActiveTagPoints
Active tag point list.
Definition: OgreSkeletonInstance.h:134
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.