Skip to main content

MeshAnalysis

Struct MeshAnalysis 

Source
#[non_exhaustive]
pub struct MeshAnalysis {
Show 19 fields pub input_triangles: usize, pub out_of_range: usize, pub non_finite: usize, pub repeated_index: usize, pub coincident_corners: usize, pub duplicate: usize, pub reversed_duplicate: usize, pub triangles: usize, pub vertices: usize, pub edges: usize, pub boundary_edges: usize, pub boundary_components: usize, pub non_manifold_edges: usize, pub non_manifold_vertices: usize, pub orientation_conflicts: usize, pub components: usize, pub largest_component: usize, pub smallest_component: usize, pub lists: AnalysisLists,
}
Expand description

Topology report from analyze_mesh. Not in C++ meshoptimizer.

Triangles are first classified as in sanitize. Triangles with an out-of-range index, a non-finite referenced position or a repeated index are counted and left out of the topology; so are triangles with coincident corners when positions are welded, since their corners then repeat a vertex. The remaining Self::triangles, duplicates included, form the analyzed topology, so a duplicate face shows up as the edge defects it causes.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§input_triangles: usize

Triangles in the input.

§out_of_range: usize

Left out: an index is at or beyond the vertex count.

§non_finite: usize

Left out: a referenced position has a NaN or infinite component.

§repeated_index: usize

Left out: two corners use the same index.

§coincident_corners: usize

Triangles with distinct indices and two corners at equal positions (signed zeros equal). Left out only with welded positions; otherwise counted and analyzed.

§duplicate: usize

Analyzed triangles with the same corners and winding as an earlier analyzed triangle, after a cyclic rotation. The first winding is kept; later copies of either winding count here. sanitize with IGNORE_ORIENTATION classifies copies differently.

§reversed_duplicate: usize

Analyzed triangles that are the first with the opposite winding of an earlier analyzed triangle with the same corners. Later copies of that winding count as duplicate.

§triangles: usize

Triangles in the analyzed topology.

§vertices: usize

Distinct vertices used by analyzed triangles.

§edges: usize

Distinct undirected edges of analyzed triangles.

§boundary_edges: usize

Edges with exactly one face.

§boundary_components: usize

Connected sets of boundary edges, joined at shared vertices. Equal to the number of holes and borders when each boundary vertex has one incoming and one outgoing boundary edge; borders that touch at a vertex count as one.

§non_manifold_edges: usize

Edges with more than two faces.

§non_manifold_vertices: usize

Vertices whose faces form more than one fan, where two faces around a vertex are in one fan when a chain of faces sharing edges at that vertex connects them. A bow-tie vertex has two fans.

§orientation_conflicts: usize

Edges with exactly two incident faces using the same direction.

§components: usize

Sets of analyzed triangles connected through shared vertices.

§largest_component: usize

Triangles in the largest component, or zero.

§smallest_component: usize

Triangles in the smallest component, or zero.

§lists: AnalysisLists

Bounded lists of the counted defects.

Trait Implementations§

Source§

impl Clone for MeshAnalysis

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MeshAnalysis

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MeshAnalysis

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for MeshAnalysis

Source§

impl PartialEq for MeshAnalysis

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MeshAnalysis

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.