Physics2D: Automatically compute center of mass

This commit is contained in:
Lynix
2019-03-17 15:56:38 +01:00
parent b6c1bfb5d0
commit 439a62a7f8
5 changed files with 54 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ namespace Nz
void SetElasticity(std::size_t shapeIndex, float elasticity);
void SetFriction(float friction);
void SetFriction(std::size_t shapeIndex, float friction);
void SetGeom(Collider2DRef geom, bool recomputeMoment = true);
void SetGeom(Collider2DRef geom, bool recomputeMoment = true, bool recomputeMassCenter = true);
void SetMass(float mass, bool recomputeMoment = true);
void SetMassCenter(const Vector2f& center, CoordSys coordSys = CoordSys_Local);
void SetMomentOfInertia(float moment);