#ifndef _ANIMATION_H #define _ANIMATION_H #include "thing.h" #include <string> #include <vector> #ifndef PI #define PI 3.14159265f #endif using namespace std; class Animation { public: Animation(); virtual void init(); virtual void tick(); }; class StaticAnimation : public Animation { private: Vec* rot_diff; Vec* pos_diff; Vec* amb_diff; Vec* spec_diff; std::vector<Thing*> things; float speed; public: StaticAnimation(); StaticAnimation(Thing* t); void init(); void tick(); void setRot(Vec r); void setPos(Vec p); void addThing(Thing* t); void setSpeed(float s); virtual ~StaticAnimation(); }; class UserAnimation : public Animation { private: int mouseX; int mouseY; float speed; int current; int colorpt; std::vector<Color*> colors; std::vector<Thing*> things; int kbdlock; bool showNormals; bool showMe; float delta; bool trace; int iterations; public: UserAnimation(); UserAnimation(Thing* t); UserAnimation(std::vector<Thing*> ths); void addThing(Thing* t); void addColor(Color* t); void init(); void tick(); virtual ~UserAnimation(); }; #endif