Skip to main content

LimitEvaluator

Struct LimitEvaluator 

Source
pub struct LimitEvaluator<'a> { /* private fields */ }
Expand description

Uniform per-quad limit evaluation over a refined level; built by RefinementResult::limit_evaluator. See the module docs.

Implementations§

Source§

impl LimitEvaluator<'_>

Source

pub fn closest_point( &self, query: [f32; 3], ) -> Result<ClosestPoint, KernelError>

Closest point on the limit surface to query, signed on closed surfaces. See the module docs of closest_point.rs for the search, walk, tolerance, and sign semantics. The acceleration index is built on the first call and reused afterwards.

Source§

impl LimitEvaluator<'_>

Source

pub fn quad_class(&self, face: u32) -> QuadClass

Classification of refined face face (the s1 table’s).

Source

pub fn eval(&self, face: u32, uv: [f32; 2]) -> Result<[f32; 3], KernelError>

Limit position of refined quad face at in-quad (u, v) (clamped to [0, 1]^2).

Source

pub fn eval_with_derivatives( &self, face: u32, uv: [f32; 2], ) -> Result<LimitSample, KernelError>

Limit position and first derivatives (p, dp/du, dp/dv) of refined quad face at in-quad (u, v) (clamped to [0, 1]^2); see the module docs for the derivative conventions. du x dv is the winding-oriented surface normal wherever it does not degenerate.

Source

pub fn weights_at( &self, face: u32, uv: [f32; 2], ) -> Result<Vec<(u32, f32)>, KernelError>

The sparse position stencil of eval at (face, uv), over the refined level’s vertices (amendment limit-oracle design §3): unique (vertex, weight) pairs partitioning unity, with eval(face, uv) == sum_i w_i * positions[i] up to f32 rounding. The limit point is linear in the refined positions, so the row is exactly d eval(face, uv) / d positions; folding it through RefinementResult::compose_stencils yields the cage stencil (the host-side split of RefinementResult::compose_limit_stencils).

(u, v) is clamped like eval and the row follows the same branch structure – regular patch basis, persistent-feature corner masks, recursive isolation with the identical depth-cap fallback – composed in f64 and rounded once on return, so a row exists wherever eval succeeds and shares its isolation cache.

Auto Trait Implementations§

§

impl<'a> !Freeze for LimitEvaluator<'a>

§

impl<'a> !RefUnwindSafe for LimitEvaluator<'a>

§

impl<'a> !Sync for LimitEvaluator<'a>

§

impl<'a> Send for LimitEvaluator<'a>

§

impl<'a> Unpin for LimitEvaluator<'a>

§

impl<'a> UnsafeUnpin for LimitEvaluator<'a>

§

impl<'a> UnwindSafe for LimitEvaluator<'a>

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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,