pub struct Adjacency { /* private fields */ }Expand description
Corner table of a Mesh: for every triangle corner, the corner across the
opposite edge, plus one corner per vertex and a non-manifold flag per vertex.
Built by Mesh::ensure_adjacency and cached until the next topology change.
See the module docs for the corner numbering.
Implementations§
Source§impl Adjacency
impl Adjacency
Sourcepub fn opposite(&self, corner: u32) -> Option<u32>
pub fn opposite(&self, corner: u32) -> Option<u32>
The corner across the edge opposite corner, if that edge is interior.
Sourcepub fn edge_kind(&self, corner: u32) -> EdgeKind
pub fn edge_kind(&self, corner: u32) -> EdgeKind
Kind of the edge opposite corner. Corners of dead triangles read as boundary.
Sourcepub fn vertex_corner(&self, v: VertexId) -> Option<u32>
pub fn vertex_corner(&self, v: VertexId) -> Option<u32>
One corner at vertex v, or None if no triangle uses it.
Sourcepub fn is_non_manifold_vertex(&self, v: VertexId) -> bool
pub fn is_non_manifold_vertex(&self, v: VertexId) -> bool
True when the triangles around v do not form a single fan: two surfaces meet
only at v (a “bowtie”), or an edge at v is non-manifold.
Sourcepub fn triangles_around(&self, mesh: &Mesh, v: VertexId) -> Vec<TriangleId> ⓘ
pub fn triangles_around(&self, mesh: &Mesh, v: VertexId) -> Vec<TriangleId> ⓘ
Triangles in the fan of v reached from Adjacency::vertex_corner through
interior edges. For a non-manifold vertex this is one fan, not every triangle.