From 797dead2099fc7e2d41e2b26bc8ef18b4166d72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sat, 23 Mar 2024 11:25:53 +0100 Subject: [PATCH 1/3] doc: specifiy that inv_principal_inertia_sqrt is calculated relative to the center of mass --- src/mass_properties/mass_properties.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mass_properties/mass_properties.rs b/src/mass_properties/mass_properties.rs index 1fd833d0..351b334a 100644 --- a/src/mass_properties/mass_properties.rs +++ b/src/mass_properties/mass_properties.rs @@ -28,6 +28,7 @@ pub struct MassProperties { pub inv_mass: Real, /// The inverse of the principal angular inertia of the rigid-body. /// + /// The angular inertia is calculated relative to [`Self::local_com`]. /// Components set to zero are assumed to be infinite along the corresponding principal axis. pub inv_principal_inertia_sqrt: AngVector, #[cfg(feature = "dim3")] @@ -116,7 +117,7 @@ impl MassProperties { utils::inv(self.inv_mass) } - /// The angular inertia along the principal inertia axes of the rigid-body. + /// The angular inertia along the principal inertia axes and center of mass of the rigid-body. pub fn principal_inertia(&self) -> AngVector { #[cfg(feature = "dim2")] return utils::inv(self.inv_principal_inertia_sqrt * self.inv_principal_inertia_sqrt); From 9273b844be3966a49a37859ce950558e4e0d718c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sat, 23 Mar 2024 11:30:05 +0100 Subject: [PATCH 2/3] chore: warning fix --- src/partitioning/qbvh/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/partitioning/qbvh/mod.rs b/src/partitioning/qbvh/mod.rs index 87ca330a..cd72717b 100644 --- a/src/partitioning/qbvh/mod.rs +++ b/src/partitioning/qbvh/mod.rs @@ -1,8 +1,6 @@ #[cfg(feature = "std")] pub use self::{ - build::{ - BuilderProxies, CenterDataSplitter, QbvhDataGenerator, QbvhNonOverlappingDataSplitter, - }, + build::{CenterDataSplitter, QbvhDataGenerator, QbvhNonOverlappingDataSplitter}, update::QbvhUpdateWorkspace, }; From 1e4e9e553f264d7c91ee78effc0ccc9a56ee663a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sat, 23 Mar 2024 11:38:38 +0100 Subject: [PATCH 3/3] chore: CI fix --- src/shape/triangle.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shape/triangle.rs b/src/shape/triangle.rs index e0c9b6c6..79492ce4 100644 --- a/src/shape/triangle.rs +++ b/src/shape/triangle.rs @@ -559,7 +559,7 @@ impl Triangle { /// Reverse the orientation of this triangle by swapping b and c. pub fn reverse(&mut self) { - std::mem::swap(&mut self.b, &mut self.c); + mem::swap(&mut self.b, &mut self.c); } }