00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OGRE 00004 (Object-oriented Graphics Rendering Engine) 00005 For the latest info, see http://www.ogre3d.org/ 00006 00007 Copyright (c) 2000-2006 Torus Knot Software Ltd 00008 Also see acknowledgements in Readme.html 00009 00010 This program is free software; you can redistribute it and/or modify it under 00011 the terms of the GNU Lesser General Public License as published by the Free Software 00012 Foundation; either version 2 of the License, or (at your option) any later 00013 version. 00014 00015 This program is distributed in the hope that it will be useful, but WITHOUT 00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License along with 00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00022 http://www.gnu.org/copyleft/lesser.txt. 00023 00024 You may alternatively use this source under the terms of a specific version of 00025 the OGRE Unrestricted License provided you have obtained such a license from 00026 Torus Knot Software Ltd. 00027 ----------------------------------------------------------------------------- 00028 */ 00029 00030 #ifndef __SkeletonInstance_H__ 00031 #define __SkeletonInstance_H__ 00032 00033 #include "OgrePrerequisites.h" 00034 #include "OgreSkeleton.h" 00035 00036 namespace Ogre { 00037 00047 class _OgreExport SkeletonInstance : public Skeleton 00048 { 00049 public: 00053 SkeletonInstance(const SkeletonPtr& masterCopy); 00054 ~SkeletonInstance(); 00055 00057 unsigned short getNumAnimations(void) const; 00058 00060 Animation* getAnimation(unsigned short index) const; 00062 Animation* _getAnimationImpl(const String& name, 00063 const LinkedSkeletonAnimationSource** linker = 0) const; 00064 00071 Animation* createAnimation(const String& name, Real length); 00072 00074 Animation* getAnimation(const String& name, 00075 const LinkedSkeletonAnimationSource** linker = 0) const; 00076 00081 void removeAnimation(const String& name); 00082 00083 00085 TagPoint* createTagPointOnBone(Bone* bone, 00086 const Quaternion &offsetOrientation = Quaternion::IDENTITY, 00087 const Vector3 &offsetPosition = Vector3::ZERO); 00088 00090 void freeTagPoint(TagPoint* tagPoint); 00091 00093 void addLinkedSkeletonAnimationSource(const String& skelName, 00094 Real scale = 1.0f); 00096 void removeAllLinkedSkeletonAnimationSources(void); 00098 LinkedSkeletonAnimSourceIterator 00099 getLinkedSkeletonAnimationSourceIterator(void) const; 00100 00102 void _initAnimationState(AnimationStateSet* animSet); 00103 00105 void _refreshAnimationState(AnimationStateSet* animSet); 00106 00108 const String& getName(void) const; 00110 ResourceHandle getHandle(void) const; 00112 const String& getGroup(void); 00113 00114 protected: 00116 SkeletonPtr mSkeleton; 00117 00118 typedef std::list<TagPoint*> TagPointList; 00119 00128 TagPointList mActiveTagPoints; 00129 00137 TagPointList mFreeTagPoints; 00138 00140 unsigned short mNextTagPointAutoHandle; 00141 00142 void cloneBoneAndChildren(Bone* source, Bone* parent); 00145 void loadImpl(void); 00148 void unloadImpl(void); 00149 00150 }; 00151 00152 } 00153 00154 00155 #endif 00156
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 27 22:02:26 2009