GR Engine
A physics engine in curved space-time
 All Classes Files Functions Variables
entity.h
Go to the documentation of this file.
1 #ifndef __ENTITY__
2 #define __ENTITY__
3 
8 #include "particle.h"
9 #include "numeric.h"
10 
17 class Entity : public Particle
18 {
19  Point p;
20  vector4 basis[3]; //local basis
21  Manifold* m;
22 
24  void orthonormalize();
25 
26  double force[3];
27  double angvel[3];
28 
30 
33  vector4 calculateFourForce(int component);
34 
36  StateVector constructState();
38  void setState(StateVector);
40  Point getPosFromState(StateVector);
42  vector4 getVelFromState(StateVector);
44  vector4 getVectorFromState(StateVector, int);
45 public:
46  //Entity(Manifold*, Point, vector4); - TODO
48 
56  Entity(Manifold* _m, Point _p, vector4 _u, vector4 _x, vector4 _y, vector4 _z);
58  ~Entity();
59 
61 
63  vector4 getStateVector(int i);
65  vector4 getX();
67  vector4 getY();
69  vector4 getZ();
70 
72 
75  StateVector derivative(StateVector v);
77  void setCoordSystem(int);
78 
80 
83  void setPosVel(Point, vector4);
85 
87  void setVel(vector4);
88 
90 
94  void applyForce(double x, double y, double z);
96 
100  void applyAngVel(double x, double y, double z);
102 
106  void rotate(double pitch, double yaw, double roll);
107 };
108 
109 #endif
110