diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-06-09 10:57:37 +0200 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-06-09 12:09:58 +0200 |
| commit | edaa36ac7e702f419faab4ff1b9af858fc84177f (patch) | |
| tree | 059a92ef66db3f4769146ef20b64b3dcbb649129 /src/geometry | |
| parent | cfddaa3c46e58f59d551e3dc7fc5d4380b322789 (diff) | |
| download | rapier-edaa36ac7e702f419faab4ff1b9af858fc84177f.tar.gz rapier-edaa36ac7e702f419faab4ff1b9af858fc84177f.tar.bz2 rapier-edaa36ac7e702f419faab4ff1b9af858fc84177f.zip | |
chore: add more comments
Diffstat (limited to 'src/geometry')
| -rw-r--r-- | src/geometry/mesh_converter.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/geometry/mesh_converter.rs b/src/geometry/mesh_converter.rs index 44d5829..5d47f79 100644 --- a/src/geometry/mesh_converter.rs +++ b/src/geometry/mesh_converter.rs @@ -1,6 +1,8 @@ use parry::bounding_volume; -use parry::math::{Isometry, Point, Real, DIM}; +use parry::math::{Isometry, Point, Real}; use parry::shape::{Cuboid, SharedShape, TriMeshFlags}; + +#[cfg(feature = "dim3")] use parry::transformation::vhacd::VHACDParameters; /* @@ -9,8 +11,10 @@ use parry::transformation::vhacd::VHACDParameters; * */ +/// Error that can be generated by the [`MeshConverter`]. #[derive(thiserror::Error, Debug)] pub enum MeshConverterError { + /// The convex hull calculation carried out by the [`MeshConverter::ConvexHull`] failed. #[error("convex-hull computation failed")] ConvexHullFailed, } @@ -47,6 +51,8 @@ pub enum MeshConverter { } impl MeshConverter { + /// Applies the conversion rule described by this [`MeshConverter`] to build a shape from + /// the given vertex and index buffers. pub fn convert( &self, vertices: Vec<Point<Real>>, |
