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 © 2000-2002 The OGRE Team 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 */ 00025 00026 #ifndef __AnimationSet_H__ 00027 #define __AnimationSet_H__ 00028 00029 #include "OgrePrerequisites.h" 00030 00031 #include "OgreString.h" 00032 #include "OgreController.h" 00033 00034 namespace Ogre { 00035 00043 class _OgreExport AnimationState : public ControllerValue<Real> 00044 { 00045 public: 00047 AnimationState(); 00051 virtual ~AnimationState(); 00052 00054 AnimationState(const String& animName, Real timePos, Real length, Real weight = 1.0, bool enabled = false); 00056 const String& getAnimationName() const; 00058 void setAnimationName(const String& name); 00060 Real getTimePosition(void) const; 00062 void setTimePosition(Real timePos); 00064 Real getLength() const; 00066 void setLength(Real len); 00068 Real getWeight(void) const; 00070 void setWeight(Real weight); 00072 void addTime(Real offset); 00073 00075 bool getEnabled(void) const; 00077 void setEnabled(bool enabled); 00078 00080 bool operator==(const AnimationState& rhs) const; 00081 // Inequality operator 00082 bool operator!=(const AnimationState& rhs) const; 00083 00085 Real getValue(void) const; 00086 00088 void setValue(Real value); 00089 00090 00091 protected: 00092 String mAnimationName; 00093 Real mTimePos; 00094 Real mLength; 00095 Real mInvLength; 00096 Real mWeight; 00097 bool mEnabled; 00098 00099 }; 00100 00101 // A set of animation states 00102 typedef std::map<String, AnimationState> AnimationStateSet; 00103 00104 00105 } 00106 00107 #endif 00108
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:01 2004