chore: add more comments

This commit is contained in:
Sébastien Crozet
2024-06-09 10:57:37 +02:00
committed by Sébastien Crozet
parent cfddaa3c46
commit edaa36ac7e
41 changed files with 897 additions and 202 deletions

View File

@@ -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>>,