diff options
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>>, |
