#[non_exhaustive]pub struct ComponentTopology {
pub triangles: Vec<usize>,
pub vertices: usize,
pub edges: usize,
pub euler_characteristic: i64,
pub boundary_loops: usize,
pub orientable: bool,
pub consistently_oriented: bool,
pub surface: SurfaceKind,
pub homology_basis: Option<Vec<EdgeLoop>>,
}Expand description
The topology of one connected component.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.triangles: Vec<usize>The component’s triangles, as indices into the mesh’s triangles.
vertices: usizeVertices the component’s triangles use.
edges: usizeDistinct edges of the component’s triangles.
euler_characteristic: i64vertices - edges + triangles.
boundary_loops: usizeClosed loops of boundary edges (edges on one triangle).
orientable: boolWhether the triangles can be wound consistently.
consistently_oriented: boolWhether they are: every interior edge is used once in each direction. Only an orientable component can be.
surface: SurfaceKindThe surface, from euler_characteristic = 2 - 2g - b (orientable)
or 2 - k - b (non-orientable).
homology_basis: Option<Vec<EdgeLoop>>A basis of the component’s first homology with Z2 coefficients:
2g closed edge loops for a closed orientable component of genus
g, k for a closed non-orientable one with k crosscaps, and
2g + (b - 1) or k + (b - 1) with b >= 1 boundary loops.
Cutting along all of them leaves a disc (closed) or a disc with the
one boundary loop left out of the basis (with boundary). Always
Some for a classified component; kept optional for stability.
Trait Implementations§
Source§impl Clone for ComponentTopology
impl Clone for ComponentTopology
Source§fn clone(&self) -> ComponentTopology
fn clone(&self) -> ComponentTopology
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more