coeng
diff src/co_phys.h @ 8:8cce82794f90
seems to work nicely
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 15 Feb 2015 05:14:20 +0200 |
parents | 2f872a179914 |
children |
line diff
1.1 --- a/src/co_phys.h Sat Feb 14 10:08:00 2015 +0200 1.2 +++ b/src/co_phys.h Sun Feb 15 05:14:20 2015 +0200 1.3 @@ -15,15 +15,25 @@ 1.4 1.5 public: 1.6 SimWorld *world; 1.7 + bool fixed; 1.8 float mass, elast, friction; 1.9 Vector3 vel, force; 1.10 Vector3 impulse; 1.11 1.12 CoRigid(); 1.13 1.14 + void set_fixed(bool f); 1.15 + bool get_fixed() const; 1.16 + 1.17 + void set_mass(float mass); 1.18 + float get_mass() const; 1.19 + 1.20 void add_impulse(const Vector3 &v); 1.21 1.22 void update(float dt); 1.23 }; 1.24 1.25 +// helper component accessors 1.26 +CoRigid *gobj_co_rigid(const GObject *obj, bool nofail = true); 1.27 + 1.28 #endif // COMP_PHYS_H_