00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00035 #ifndef SO3ANIMTRACK_H
00036 #define SO3ANIMTRACK_H
00037
00038 #include "..\SCOLBasic\SO3Std.h"
00039 #include "..\SCOLBasic\SO3DataScol.h"
00040
00041 namespace SO3
00042 {
00043
00044 class SAnimTrack : public SData
00045 {
00046 public:
00047 enum AnimTrackType
00048 {
00049 SO3_NODE_TRACK = 0,
00050 SO3_VERTEX_TRACK = 1,
00051 SO3_NUMERIC_TRACK = 2,
00052 SO3_POSE_TRACK = 3,
00053 SO3_SEQUENCE_TRACK = 4
00054 };
00055 protected:
00056 Ogre::AnimationTrack* ogreAnimationTrack;
00057 private:
00058 SAnim* parentAnimation;
00059 AnimTrackType type;
00060
00061 public:
00064 ~SAnimTrack();
00065
00068 SAnim* GetParentAnimation();
00069
00072 Ogre::AnimationTrack* GetOgreAnimationTrackPointer();
00073
00076 AnimTrackType GetType();
00077
00080 void SetOptimise();
00081
00084 Ogre::AnimationTrack* _Clone(Ogre::Animation* tanim, unsigned short tid);
00085
00088 virtual unsigned short GetNumKeyFrames();
00089
00092 virtual void CreateKey(float timepos, Ogre::Vector3 pos, Ogre::Quaternion quat, Ogre::Vector3 scale);
00093
00096 virtual void SetKeyTransform(unsigned int keyIndex, Ogre::Vector3 pos, Ogre::Quaternion quat, Ogre::Vector3 scale);
00097
00100 virtual void GetKeyTransform(unsigned int keyIndex, Ogre::Vector3 &pos, Ogre::Quaternion &quat, Ogre::Vector3 &scale);
00101
00104 virtual float GetKeyPositionTime(unsigned int keyIndex);
00105
00108 virtual void RemoveKey(unsigned int keyIndex);
00109
00112 virtual void RemoveAllKeyFrames();
00113
00116 virtual void Update(float pos);
00117 protected:
00121 SAnimTrack(std::string animationTrackName, SAnim* animation, AnimTrackType animationTrackType);
00122 private:
00126 SAnimTrack();
00127 };
00128
00129 }
00130
00131 #endif