pub struct SurfaceSeeds { /* private fields */ }Expand description
A surface’s seeding grid, built once and asked many times.
project_on_surface evaluates the same grid of surface points for
every call: hundreds of evaluations per projection, identical each
time. A caller projecting many targets onto one surface builds the
grid once and each projection reduces to a nearest-seed scan plus the
Newton polish: the same seeds, the same refinement, the same answer to
the bit, at a fraction of the evaluations.
Implementations§
Source§impl SurfaceSeeds
impl SurfaceSeeds
Sourcepub fn over(
surface: &SurfaceGeometry,
samples: usize,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn over( surface: &SurfaceGeometry, samples: usize, tol: Tolerances, ) -> OgeomResult<Self>
Evaluate the grid project_on_surface would use, once.
§Errors
Never for a well-formed surface; evaluation failures leave gaps in the grid exactly as the per-call version tolerates them.
Sourcepub fn project(
&self,
surface: &SurfaceGeometry,
target: Point,
tol: Tolerances,
) -> OgeomResult<SurfaceProjection>
pub fn project( &self, surface: &SurfaceGeometry, target: Point, tol: Tolerances, ) -> OgeomResult<SurfaceProjection>
Project target, seeded from the stored grid, bit-identical to
project_on_surface at the same sample count.
§Errors
Trait Implementations§
Source§impl Clone for SurfaceSeeds
impl Clone for SurfaceSeeds
Source§fn clone(&self) -> SurfaceSeeds
fn clone(&self) -> SurfaceSeeds
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SurfaceSeeds
impl RefUnwindSafe for SurfaceSeeds
impl Send for SurfaceSeeds
impl Sync for SurfaceSeeds
impl Unpin for SurfaceSeeds
impl UnsafeUnpin for SurfaceSeeds
impl UnwindSafe for SurfaceSeeds
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.