pub enum AnalyticSurface {
Plane {
origin: Vec3,
u_dir: Vec3,
v_dir: Vec3,
u_domain: [f64; 2],
v_domain: [f64; 2],
},
RuledRevolution {
frame: RevolutionFrame,
rho0: f64,
rho1: f64,
height: f64,
},
Sphere {
frame: RevolutionFrame,
radius: f64,
},
Torus {
frame: RevolutionFrame,
major_radius: f64,
minor_radius: f64,
},
Revolution {
frame: RevolutionFrame,
spans: usize,
sweep: f64,
generatrix: NurbsCurve,
},
}Variants§
Plane
Affine patch: S(u,v) = origin + u·u_dir + v·v_dir over the knot domain.
RuledRevolution
Full revolution of a straight generatrix: cylinders (rho0 == rho1) and cones/frusta, with v linear along the generatrix over [0, 1].
Sphere
Full revolution of a -π/2..π/2 polar meridian arc (two 90° spans).
Torus
Full revolution of a full tube circle (four 90° spans in v).
Revolution
GENERAL revolution (full or partial sweep) of an arbitrary
generatrix — every other make_revolution product the classic
quadric variants above do not cover. The closest surface point to
a query lies in the query’s meridian half-plane, so projection
reduces exactly to a 1D projection onto the generatrix (rotated
rigidly about the axis); out-of-sweep queries compare the two
boundary meridians instead (Golovanov §4.13: prefer analytic
constructions — this was the unrecognized carrier that sent
tangent glue pairs into the marcher).
Implementations§
Source§impl AnalyticSurface
impl AnalyticSurface
Sourcepub fn project(
&self,
surface: &NurbsSurface,
point: Vec3,
) -> Option<SurfaceProjection>
pub fn project( &self, surface: &NurbsSurface, point: Vec3, ) -> Option<SurfaceProjection>
Closed-form point projection in the surface’s own parameterization. Returns the exact nearest parameter; the caller evaluates the NURBS at that parameter so results stay bit-consistent with the carrier.
Sourcepub fn frame(&self) -> Option<&RevolutionFrame>
pub fn frame(&self) -> Option<&RevolutionFrame>
True when the closed-form projection is the exact global minimizer (everywhere except on-axis queries, where any meridian ties).
Trait Implementations§
Source§impl Clone for AnalyticSurface
impl Clone for AnalyticSurface
Source§fn clone(&self) -> AnalyticSurface
fn clone(&self) -> AnalyticSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more