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 #ifndef __NEANIMATION_H
00028 #define __NEANIMATION_H
00029
00030
00031 #include "base.h"
00032 #include "hashstring.h"
00033 #include "updateentity.h"
00034
00035 #include <vector>
00036
00037 #include <assert.h>
00038
00039
00046 namespace NeoEngine
00047 {
00048
00049
00054 template < class KeyframeType > class Animation : public virtual UpdateEntity
00055 {
00056 public:
00057
00058 typedef std::vector< KeyframeType* > KeyframeVec;
00059
00061 KeyframeVec m_vpkKeyframes;
00062
00064 unsigned int m_uiID;
00065
00067 HashString m_strName;
00068
00070 float m_fLength;
00071
00073 float m_fCurTime;
00074
00076 int m_iLastKeyframe;
00077
00079 int m_iNextKeyframe;
00080
00082 float m_fOffset;
00083
00084
00088 Animation();
00089
00094 Animation( const Animation< KeyframeType > &rkAnimation );
00095
00099 virtual ~Animation();
00100
00105 inline virtual void AddKeyframe( KeyframeType *pkKeyframe );
00106
00111 inline virtual void Update( float fDeltaTime );
00112 };
00113
00114
00115 #include "animation_inl.h"
00116
00117
00118 };
00119
00120
00121 #endif