parry3d/transformation/mesh_intersection/
mesh_intersection_error.rs1use crate::shape::TriMeshBuilderError;
2
3#[cfg(doc)]
4use crate::shape::{TriMesh, TriMeshFlags};
5
6#[derive(thiserror::Error, Debug, Copy, Clone, Eq, PartialEq)]
8pub enum MeshIntersectionError {
9 #[error("at least one of the meshes is missing its topology information. Ensure that the `TriMeshFlags::ORIENTED` flag is enabled on both meshes.")]
11 MissingTopology,
12 #[error("at least one of the meshes is missing its pseudo-normals. Ensure that the `TriMeshFlags::ORIENTED` flag is enabled on both meshes.")]
14 MissingPseudoNormals,
15 #[error("internal failure while intersecting two triangles")]
17 TriTriError,
18 #[error("internal failure while merging faces resulting from intersections")]
20 DuplicateVertices,
21 #[error("internal failure while triangulating an intersection face")]
23 TriangulationError,
24 #[error("TriMeshBuilderError: {0}")]
26 TriMeshBuilderError(TriMeshBuilderError),
27}
28
29impl From<TriMeshBuilderError> for MeshIntersectionError {
30 fn from(value: TriMeshBuilderError) -> Self {
31 MeshIntersectionError::TriMeshBuilderError(value)
32 }
33}