pub struct WindingMesh<'a, 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§
Source§impl<'a, M: TriangleMeshView + ?Sized> WindingMesh<'a, M>
impl<'a, M: TriangleMeshView + ?Sized> WindingMesh<'a, M>
Sourcepub fn prepare(mesh: &'a M, tolerance: Tolerance) -> Result<Self, WindingError>
pub fn prepare(mesh: &'a M, tolerance: Tolerance) -> Result<Self, 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.
Sourcepub fn winding_number(
&self,
point: Point3,
) -> Result<WindingNumber, WindingError>
pub fn winding_number( &self, point: Point3, ) -> Result<WindingNumber, WindingError>
Accumulate the generalized winding number at one finite query point.
Trait Implementations§
Source§impl<'a, M: Clone + TriangleMeshView + ?Sized> Clone for WindingMesh<'a, M>
impl<'a, M: Clone + TriangleMeshView + ?Sized> Clone for WindingMesh<'a, M>
Source§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 moreSource§impl<M: TriangleMeshView + ?Sized> Debug for WindingMesh<'_, M>
impl<M: TriangleMeshView + ?Sized> Debug for WindingMesh<'_, M>
impl<'a, M: Copy + TriangleMeshView + ?Sized> 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