coeng
annotate src/sim.h @ 9:49fdb15f1100
added makefile rule to download and unpack the obj file
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 15 Feb 2015 05:23:09 +0200 |
parents | 2f872a179914 |
children |
rev | line source |
---|---|
nuclear@6 | 1 #ifndef COENG_SIM_H_ |
nuclear@6 | 2 #define COENG_SIM_H_ |
nuclear@6 | 3 |
nuclear@6 | 4 #include <list> |
nuclear@6 | 5 #include "co_phys.h" |
nuclear@8 | 6 #include "co_collider.h" |
nuclear@6 | 7 #include "gobj.h" |
nuclear@6 | 8 |
nuclear@6 | 9 class SimWorld { |
nuclear@6 | 10 private: |
nuclear@6 | 11 std::list<CoRigid*> rigid; |
nuclear@6 | 12 Vector3 gravity; |
nuclear@6 | 13 float damping; |
nuclear@6 | 14 |
nuclear@6 | 15 public: |
nuclear@6 | 16 SimWorld(); |
nuclear@6 | 17 |
nuclear@6 | 18 void add_object(GObject *obj); // convenience function, calls add_rigid_body |
nuclear@6 | 19 void add_rigid_body(CoRigid *co); |
nuclear@6 | 20 |
nuclear@6 | 21 void remove_object(GObject *obj); // convenience function, calls remove_rigid_body |
nuclear@6 | 22 void remove_rigid_body(CoRigid *co); |
nuclear@6 | 23 |
nuclear@6 | 24 void set_damping(float damping); |
nuclear@6 | 25 float get_damping() const; |
nuclear@6 | 26 |
nuclear@6 | 27 void set_gravity(const Vector3 &v); |
nuclear@6 | 28 const Vector3 &get_gravity() const; |
nuclear@8 | 29 |
nuclear@8 | 30 bool collide(const GObject *obj, HitPoint *hit = 0) const; |
nuclear@8 | 31 bool collide(const CoCollider *col, HitPoint *hit = 0) const; |
nuclear@6 | 32 }; |
nuclear@6 | 33 |
nuclear@6 | 34 #endif // COENG_SIM_H_ |