00001 #ifndef ANIMATION_H_ 00002 #define ANIMATION_H_ 00003 #include <list> 00004 #include <iostream> 00005 #include <cmath> 00006 #include "Transform.h" 00007 #include "Vector.h" 00008 using std::list; 00009 using std::cout; 00010 00018 class Animation 00019 { 00020 private: 00024 Transform* target; 00025 00029 int aniType; 00030 00035 double period; 00036 00041 double amplitude; 00042 00047 double displacement; 00048 00057 int fieldMask; 00058 00062 static list<Animation*> animations; 00063 00067 static void registerNew(Animation* ani); 00068 00069 public: 00073 static void remove(Transform* t); 00074 00078 static const int ANI_SINUSOIDAL = 0x0001; 00079 00083 static const int ANI_SAWTOOTH = 0x0002; 00084 00089 Animation(Transform* target, int aniType, double period, double amplitude, 00090 double displacement, int fieldMask); 00091 00095 static void nextTick(unsigned long tick); 00096 00100 virtual ~Animation(); 00101 }; 00102 00103 #endif /*ANIMATION_H_*/