SO3Engine
SO3AnimTrack.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
32#ifndef __SO3_ANIM_TRACK_H__
33#define __SO3_ANIM_TRACK_H__
34
37
38namespace SO3
39{
40
41class SAnimTrack : public SData
42{
43public:
52protected:
53 Ogre::AnimationTrack* ogreAnimationTrack;
54private:
55 SAnim* parentAnimation;
56 AnimTrackType type;
57
58public:
61 virtual ~SAnimTrack();
62
66
69 Ogre::AnimationTrack* GetOgreAnimationTrackPointer();
70
74
77 void SetOptimise();
78
81 Ogre::AnimationTrack* _Clone(Ogre::Animation* tanim, const unsigned short& tid);
82
85 virtual unsigned short GetNumKeyFrames();
86
89 virtual void CreateKey(const float& timepos, const Ogre::Vector3& pos, const Ogre::Quaternion& quat, const Ogre::Vector3& scale);
90
93 virtual void SetKeyTransform(const unsigned int& keyIndex, const Ogre::Vector3& pos, const Ogre::Quaternion& quat, const Ogre::Vector3& scale);
94
97 virtual void GetKeyTransform(const unsigned int& keyIndex, Ogre::Vector3& pos, Ogre::Quaternion& quat, Ogre::Vector3& scale);
98
101 virtual float GetKeyPositionTime(const unsigned int& keyIndex);
102
105 virtual void RemoveKey(const unsigned int& keyIndex);
106
109 virtual void RemoveAllKeyFrames();
110
113 virtual void Update(const float& pos);
114protected:
118 SAnimTrack(const std::string& animationTrackName, SAnim* animation, const AnimTrackType& animationTrackType);
119private:
123 SAnimTrack();
124};
125
126}
127
128#endif
librairies include
Ogre::AnimationTrack * _Clone(Ogre::Animation *tanim, const unsigned short &tid)
Ogre::AnimationTrack * ogreAnimationTrack
virtual void RemoveAllKeyFrames()
virtual unsigned short GetNumKeyFrames()
virtual void GetKeyTransform(const unsigned int &keyIndex, Ogre::Vector3 &pos, Ogre::Quaternion &quat, Ogre::Vector3 &scale)
virtual void RemoveKey(const unsigned int &keyIndex)
virtual void Update(const float &pos)
AnimTrackType GetType()
virtual void SetKeyTransform(const unsigned int &keyIndex, const Ogre::Vector3 &pos, const Ogre::Quaternion &quat, const Ogre::Vector3 &scale)
virtual float GetKeyPositionTime(const unsigned int &keyIndex)
SAnim * GetParentAnimation()
Ogre::AnimationTrack * GetOgreAnimationTrackPointer()
virtual void CreateKey(const float &timepos, const Ogre::Vector3 &pos, const Ogre::Quaternion &quat, const Ogre::Vector3 &scale)
virtual ~SAnimTrack()