From edaa36ac7e702f419faab4ff1b9af858fc84177f Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 9 Jun 2024 10:57:37 +0200 Subject: chore: add more comments --- src/geometry/mesh_converter.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/geometry') 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>, -- cgit