Skip to main content

Adjacency

Struct Adjacency 

Source
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

Source

pub fn opposite(&self, corner: u32) -> Option<u32>

The corner across the edge opposite corner, if that edge is interior.

Source

pub fn edge_kind(&self, corner: u32) -> EdgeKind

Kind of the edge opposite corner. Corners of dead triangles read as boundary.

Source

pub fn vertex_corner(&self, v: VertexId) -> Option<u32>

One corner at vertex v, or None if no triangle uses it.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for Adjacency

Source§

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

Formats the value using the given formatter. Read more

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.