coeng
view src/sim.h @ 6:2f872a179914
first component test:
- prs, xform, physics components with dependencies
- topological sort of components to update them in the correct order
- debug visualization component
todo: remove draw() from components, doesn't make sense
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 14 Feb 2015 07:27:12 +0200 |
parents | |
children | 8cce82794f90 |
line source
1 #ifndef COENG_SIM_H_
2 #define COENG_SIM_H_
4 #include <list>
5 #include "co_phys.h"
6 #include "gobj.h"
8 class SimWorld {
9 private:
10 std::list<CoRigid*> rigid;
11 Vector3 gravity;
12 float damping;
14 public:
15 SimWorld();
17 void add_object(GObject *obj); // convenience function, calls add_rigid_body
18 void add_rigid_body(CoRigid *co);
20 void remove_object(GObject *obj); // convenience function, calls remove_rigid_body
21 void remove_rigid_body(CoRigid *co);
23 void set_damping(float damping);
24 float get_damping() const;
26 void set_gravity(const Vector3 &v);
27 const Vector3 &get_gravity() const;
28 };
30 #endif // COENG_SIM_H_