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<'_>
impl LimitEvaluator<'_>
Sourcepub fn closest_point(
&self,
query: [f32; 3],
) -> Result<ClosestPoint, KernelError>
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<'_>
impl LimitEvaluator<'_>
Sourcepub fn quad_class(&self, face: u32) -> QuadClass
pub fn quad_class(&self, face: u32) -> QuadClass
Classification of refined face face (the s1 table’s).
Sourcepub fn eval(&self, face: u32, uv: [f32; 2]) -> Result<[f32; 3], KernelError>
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).
Sourcepub fn eval_with_derivatives(
&self,
face: u32,
uv: [f32; 2],
) -> Result<LimitSample, KernelError>
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.
Sourcepub fn weights_at(
&self,
face: u32,
uv: [f32; 2],
) -> Result<Vec<(u32, f32)>, KernelError>
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.