Skip to main content

IncidenceBuild

Struct IncidenceBuild 

Source
pub struct IncidenceBuild { /* private fields */ }
Expand description

A resumable build of a mesh’s Incidence: the build of Mesh::ensure_incidence cut into steps of a bounded number of elements (triangle or vertex slots), so that a caller can yield between them.

Each step runs the same loop bodies as the one-call build, over the next elements in the same order, so the finished index is the same, entry for entry. A build is tied to the mesh state it started from (its uid, epoch, revision and slot counts); Mesh::step_incidence starts over when the mesh has changed since, and caches the index when the build is done.

Implementations§

Source§

impl IncidenceBuild

Source

pub fn new(mesh: &Mesh) -> IncidenceBuild

A build of mesh’s incidence index as the mesh is now, with nothing done.

Source

pub fn is_for(&self, mesh: &Mesh) -> bool

Whether the build started from mesh as it is now.

Source

pub fn is_done(&self) -> bool

Whether every pass is done.

Trait Implementations§

Source§

impl Debug for IncidenceBuild

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.