Struct WindingMesh
pub struct WindingMesh<'a, M>where
M: TriangleMeshView + ?Sized,{ /* private fields */ }Expand description
A read-only, structurally prepared mesh for repeated winding queries.
Preparation performs the O(triangles) structural audit once. Individual queries only read caller-owned geometry and have no global state, mutation, threading assumption, or source identity. A batch/provider API can reuse this exact prepared-input contract later.
Implementations§
§impl<'a, M> WindingMesh<'a, M>where
M: TriangleMeshView + ?Sized,
impl<'a, M> WindingMesh<'a, M>where
M: TriangleMeshView + ?Sized,
pub fn prepare(
mesh: &'a M,
tolerance: Tolerance,
) -> Result<WindingMesh<'a, M>, WindingError>
pub fn prepare( mesh: &'a M, tolerance: Tolerance, ) -> Result<WindingMesh<'a, M>, WindingError>
Validate and prepare a foreign or owned triangle mesh.
Closedness is intentionally not required: generalized winding returns a continuous raw value for open surfaces too. Degenerate faces are rejected because their solid angles are not defined by this operation.
pub fn winding_number(
&self,
point: DVec3,
) -> Result<WindingNumber, WindingError>
pub fn winding_number( &self, point: DVec3, ) -> Result<WindingNumber, WindingError>
Accumulate the generalized winding number at one finite query point.
Trait Implementations§
§impl<'a, M> Clone for WindingMesh<'a, M>
impl<'a, M> Clone for WindingMesh<'a, M>
§fn clone(&self) -> WindingMesh<'a, M>
fn clone(&self) -> WindingMesh<'a, M>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<M> Debug for WindingMesh<'_, M>where
M: TriangleMeshView + ?Sized,
impl<M> Debug for WindingMesh<'_, M>where
M: TriangleMeshView + ?Sized,
impl<'a, M> Copy for WindingMesh<'a, M>
Auto Trait Implementations§
impl<'a, M> Freeze for WindingMesh<'a, M>where
M: ?Sized,
impl<'a, M> RefUnwindSafe for WindingMesh<'a, M>where
M: RefUnwindSafe + ?Sized,
impl<'a, M> Send for WindingMesh<'a, M>
impl<'a, M> Sync for WindingMesh<'a, M>
impl<'a, M> Unpin for WindingMesh<'a, M>where
M: ?Sized,
impl<'a, M> UnwindSafe for WindingMesh<'a, M>where
M: RefUnwindSafe + ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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