pub struct MeshQuality;Expand description
Additional triangle mesh quality metrics.
Implementations§
Source§impl MeshQuality
impl MeshQuality
Sourcepub fn compute_dihedral_angle(
ea: [f32; 3],
eb: [f32; 3],
p0: [f32; 3],
p1: [f32; 3],
) -> f32
pub fn compute_dihedral_angle( ea: [f32; 3], eb: [f32; 3], p0: [f32; 3], p1: [f32; 3], ) -> f32
Compute the dihedral angle (in degrees) between two adjacent triangles
sharing an edge defined by vertices ea and eb.
The first triangle is (ea, eb, p0) and the second is (ea, eb, p1).
Returns the angle between their face normals, in the range [0°, 180°].
Sourcepub fn compute_edge_length_ratio(
v0: [f32; 3],
v1: [f32; 3],
v2: [f32; 3],
) -> f32
pub fn compute_edge_length_ratio( v0: [f32; 3], v1: [f32; 3], v2: [f32; 3], ) -> f32
Compute the edge-length ratio (max edge / min edge) for a triangle.
A value of 1 indicates an equilateral triangle. Returns f32::INFINITY
if the minimum edge length is effectively zero (degenerate triangle).
Sourcepub fn compute_mesh_regularity(mesh: &TriangleMesh) -> f32
pub fn compute_mesh_regularity(mesh: &TriangleMesh) -> f32
Compute a global mesh regularity score in [0, 1].
Regularity is defined as:
R = 1 / (1 + sigma)where sigma is the standard deviation of the per-triangle aspect ratios.
A perfectly regular mesh (all equilateral triangles) has sigma = 0 → R = 1.
A highly irregular mesh has large sigma → R → 0.
Returns 1.0 for an empty mesh.
Auto Trait Implementations§
impl Freeze for MeshQuality
impl RefUnwindSafe for MeshQuality
impl Send for MeshQuality
impl Sync for MeshQuality
impl Unpin for MeshQuality
impl UnsafeUnpin for MeshQuality
impl UnwindSafe for MeshQuality
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.