diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-11-03 11:55:08 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-11-03 11:55:08 +0100 |
| commit | 5144cd6bf18db84e8cc5a7056ef563eff0a83bd7 (patch) | |
| tree | f9cc8d8c4241a7d1710d807098d784f98017874f /src/dynamics | |
| parent | 32b6e122c154ecc21b20314c11b084ad93a0e836 (diff) | |
| download | rapier-5144cd6bf18db84e8cc5a7056ef563eff0a83bd7.tar.gz rapier-5144cd6bf18db84e8cc5a7056ef563eff0a83bd7.tar.bz2 rapier-5144cd6bf18db84e8cc5a7056ef563eff0a83bd7.zip | |
Add more details to the MassProperties constructors comments.
Diffstat (limited to 'src/dynamics')
| -rw-r--r-- | src/dynamics/mass_properties.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dynamics/mass_properties.rs b/src/dynamics/mass_properties.rs index 9cc22a9..73e9b0d 100644 --- a/src/dynamics/mass_properties.rs +++ b/src/dynamics/mass_properties.rs @@ -25,7 +25,9 @@ pub struct MassProperties { } impl MassProperties { - /// Initializes the mass properties from the given center-of-mass, mass, and angular inertia. + /// Initializes the mass properties with the given center-of-mass, mass, and angular inertia. + /// + /// The center-of-mass is specified in the local-space of the rigid-body. #[cfg(feature = "dim2")] pub fn new(local_com: Point<f32>, mass: f32, principal_inertia: f32) -> Self { let inv_mass = utils::inv(mass); @@ -39,7 +41,9 @@ impl MassProperties { /// Initializes the mass properties from the given center-of-mass, mass, and principal angular inertia. /// - /// The principal angular inertia are the angular inertia along the coordinate axes. + /// The center-of-mass is specified in the local-space of the rigid-body. + /// The principal angular inertia are the angular inertia along the coordinate axes in the local-space + /// of the rigid-body. #[cfg(feature = "dim3")] pub fn new(local_com: Point<f32>, mass: f32, principal_inertia: AngVector<f32>) -> Self { Self::with_principal_inertia_frame(local_com, mass, principal_inertia, Rotation::identity()) @@ -47,8 +51,9 @@ impl MassProperties { /// Initializes the mass properties from the given center-of-mass, mass, and principal angular inertia. /// + /// The center-of-mass is specified in the local-space of the rigid-body. /// The principal angular inertia are the angular inertia along the coordinate axes defined by - /// the `principal_inertia_local_frame`. + /// the `principal_inertia_local_frame` expressed in the local-space of the rigid-body. #[cfg(feature = "dim3")] pub fn with_principal_inertia_frame( local_com: Point<f32>, |
