nuclear@6: #ifndef COENG_SIM_H_ nuclear@6: #define COENG_SIM_H_ nuclear@6: nuclear@6: #include nuclear@6: #include "co_phys.h" nuclear@8: #include "co_collider.h" nuclear@6: #include "gobj.h" nuclear@6: nuclear@6: class SimWorld { nuclear@6: private: nuclear@6: std::list rigid; nuclear@6: Vector3 gravity; nuclear@6: float damping; nuclear@6: nuclear@6: public: nuclear@6: SimWorld(); nuclear@6: nuclear@6: void add_object(GObject *obj); // convenience function, calls add_rigid_body nuclear@6: void add_rigid_body(CoRigid *co); nuclear@6: nuclear@6: void remove_object(GObject *obj); // convenience function, calls remove_rigid_body nuclear@6: void remove_rigid_body(CoRigid *co); nuclear@6: nuclear@6: void set_damping(float damping); nuclear@6: float get_damping() const; nuclear@6: nuclear@6: void set_gravity(const Vector3 &v); nuclear@6: const Vector3 &get_gravity() const; nuclear@8: nuclear@8: bool collide(const GObject *obj, HitPoint *hit = 0) const; nuclear@8: bool collide(const CoCollider *col, HitPoint *hit = 0) const; nuclear@6: }; nuclear@6: nuclear@6: #endif // COENG_SIM_H_