pub struct NurbsSurface {
pub degree_u: usize,
pub degree_v: usize,
pub knots_u: Vec<f64>,
pub knots_v: Vec<f64>,
pub control_points: Vec<Vec<Vec4>>,
/* private fields */
}Fields§
§degree_u: usize§degree_v: usize§knots_u: Vec<f64>§knots_v: Vec<f64>§control_points: Vec<Vec<Vec4>>Implementations§
Source§impl NurbsSurface
impl NurbsSurface
pub fn new( degree_u: usize, degree_v: usize, knots_u: Vec<f64>, knots_v: Vec<f64>, control_points: Vec<Vec<Vec4>>, ) -> Result<Self, String>
Sourcepub fn closed_directions(&self) -> Result<(bool, bool), String>
pub fn closed_directions(&self) -> Result<(bool, bool), String>
Whether the surface joins itself along u (first) and v (second):
opposite domain edges coincide at three sampled fractions. The 1e-6
threshold matches the historical LINEAR_TOLERANCE * 10 used by the
projection and curve×surface intersection modules.
pub fn domain_u(&self) -> Result<[f64; 2], String>
pub fn domain_v(&self) -> Result<[f64; 2], String>
Sourcepub fn analytic(&self) -> Option<&AnalyticSurface>
pub fn analytic(&self) -> Option<&AnalyticSurface>
The recognized analytic carrier, if this exact rational patch is a plane or a full revolution quadric/torus. Computed once per instance.
pub fn evaluate_homogeneous(&self, u: f64, v: f64) -> Result<Vec4, String>
pub fn evaluate(&self, u: f64, v: f64) -> Result<Vec3, String>
Sourcepub fn evaluate_extended(&self, u: f64, v: f64) -> Result<Vec3, String>
pub fn evaluate_extended(&self, u: f64, v: f64) -> Result<Vec3, String>
Value beyond the domain (Golovanov §3.15): closed directions wrap cyclically; open directions extend along the boundary tangent plane, with the bilinear corner form when both parameters are outside. Intersection and projection algorithms probe outside the domain, so this is a required capability of every surface.
Sourcepub fn derivatives_extended(
&self,
u: f64,
v: f64,
derivative_count: usize,
) -> Result<Vec<Vec<Vec3>>, String>
pub fn derivatives_extended( &self, u: f64, v: f64, derivative_count: usize, ) -> Result<Vec<Vec<Vec3>>, String>
Derivatives beyond the domain (§3.15). The extension is C¹: first derivatives follow the ruled/bilinear extension, second derivatives are taken at the boundary anchor (zero across an extended direction).
pub fn derivatives( &self, u: f64, v: f64, derivative_count: usize, ) -> Result<Vec<Vec<Vec3>>, String>
pub fn normal(&self, u: f64, v: f64) -> Result<Vec3, String>
Sourcepub fn is_affine(&self) -> Result<bool, String>
pub fn is_affine(&self) -> Result<bool, String>
Whether this is a genuinely affine degree-1 by degree-1 patch.
A tapered bilinear patch is planar but not affine, so degree alone is insufficient for exact inverse-parameter and integration shortcuts.
pub fn iso_curve_u(&self, u: f64) -> Result<NurbsCurve, String>
pub fn iso_curve_v(&self, v: f64) -> Result<NurbsCurve, String>
Trait Implementations§
Source§impl Clone for NurbsSurface
impl Clone for NurbsSurface
Source§fn clone(&self) -> NurbsSurface
fn clone(&self) -> NurbsSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more