dimforge / parry

2D and 3D collision-detection library for Rust.
https://parry.rs
Apache License 2.0
591 stars 104 forks source link

Consider using `polyhedral_mass_properties` #252

Open mo8it opened 3 months ago

mo8it commented 3 months ago

polyhedral_mass_properties is a library that I just published to calculate mass properties (mass, center of mass and inertia matrix/tensor) of triangle meshes. It is at least 2x faster than MassProperties::from_trimesh. See benchmark.

Using MassProperties::reconstruct_inertia_matrix returns a matrix where xy and xz are swapped. This is probably a bug in the implementation of Parry (I compared with other implementations, not only mine).

If you need any help, please let me know. I could add a version for f32 and add the Apache license.