From ba081fb6f567dd547cee86095480dd443aff2c4c Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Tue, 5 Jul 2022 14:59:14 +0200 Subject: Improve the API for initializing/setting mass-properties --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 105f375..df7d819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +## Unreleased +### Fixed + +### Modified +- The `RigidBodyBuilder::additional_mass` method will now result in the additional angular inertia + being automatically computed based on the shapes of the colliders attached to the rigid-body. +- Remove the deprecated methods `RigidBodyBuilder::mass`, `::principal_angular_inertia`, `::principal_inertia`. +- Remove the methods `RigidBodyBuilder::additional_principal_angular_inertia`. Use + `RigidBodyBuilder::additional_mass_properties` instead. + +### Added +- Add `RigidBody::recompute_mass_properties_from_colliders` to force the immediate computation + of a rigid-body’s mass properties (instead of waiting for them to be recomputed during the next + timestep). This is useful to be able to read immediately the result of a change of a rigid-body + additional mass-properties or a change of one of its collider’s mass-properties. +- Add `RigidBody::set_additional_mass` to set the additional mass for the collider. The additional + angular inertia is automatically computed based on the attached colliders shapes. +- Add `Collider::set_density`, `::set_mass`, `set_mass_properties`, to alter a collider’s mass + properties. Note that `::set_mass` will result in the collider’s angular inertia being automatically + computed based on this mass and on its shape. +- Add `ColliderBuilder::mass` to set the mass of the collider instead of its density. Its angular + inertia tensor will be automatically computed based on this mass and its shape. + ## v0.13.0 (31 May 2022) ### Fixed - Fix incorrect sensor events being generated after collider removal. -- cgit From 7831ebfc3109d4a4c2029f50e432dd1d4be9ef82 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Tue, 5 Jul 2022 15:15:17 +0200 Subject: Add methods to read the mass or volume of a collider. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index df7d819..0f1da52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Remove the deprecated methods `RigidBodyBuilder::mass`, `::principal_angular_inertia`, `::principal_inertia`. - Remove the methods `RigidBodyBuilder::additional_principal_angular_inertia`. Use `RigidBodyBuilder::additional_mass_properties` instead. +- The `Collider::density` method now always returns a `Real` (instead of an `Option`). ### Added - Add `RigidBody::recompute_mass_properties_from_colliders` to force the immediate computation @@ -20,6 +21,7 @@ computed based on this mass and on its shape. - Add `ColliderBuilder::mass` to set the mass of the collider instead of its density. Its angular inertia tensor will be automatically computed based on this mass and its shape. +- Add `Collider::mass` and `Collider::volume` to retrieve the mass or volume of a collider. ## v0.13.0 (31 May 2022) ### Fixed -- cgit