physics.h

Go to the documentation of this file.
00001 /*
00002  * physics.h
00003  *
00004  *  Created on: Mar 3, 2012
00005  *      Author: sushil
00006  */
00007 
00008 #ifndef PHYSICS_H_
00009 #define PHYSICS_H_
00010 
00011 #include<aspect.h>
00012 
00013 namespace FastEcslent {
00014 
00015 
00016         class Entity;
00017 
00018         class Physics: public UnitAspect {
00019 
00020         public:
00021                 float angleDiff;
00022                 float dHeading;
00023                 float timeScaledAcceleration;
00024                 float timeScaledRotationalSpeed;
00025                 float cosYaw;
00026                 float sinYaw;
00027                 void doHelmsman(double dt);
00028 
00029         public:
00030                 Physics(Entity *ent, UnitAspectType at): UnitAspect(ent, at){};
00031                 virtual void init() {};//= 0;
00032                 virtual void tick(double dt){};// = 0;
00033         };
00034 
00035 
00036         class Physics2D1: public Physics {
00037 
00038         private:
00039                 void doHelmsman(double dt);
00040 
00041         public:
00042                 Physics2D1(Entity* ent, UnitAspectType at): Physics(ent, at) {};
00043                 virtual void init();
00044                 virtual void tick(double dt);
00045 
00046         };
00047 
00048         class Physics2D2: public Physics {
00049 
00050         private:
00051                 void doHelmsman(double dt);
00052 
00053         public:
00054                 Physics2D2(Entity* ent, UnitAspectType at): Physics(ent, at) {};
00055                 virtual void init();
00056                 virtual void tick(double dt);
00057 
00058         };
00059 
00060 
00061 
00062 
00063 
00064 }
00065 
00066 
00067 #endif /* PHYSICS_H_ */

Generated on Fri Dec 13 14:54:16 2013 for FastECSLent by  doxygen 1.5.4