pub struct RationalBezierSpan2 { /* private fields */ }Expand description
One exact rational Bezier span extracted from a retained NURBS curve.
control_points and weights have length degree + 1. The endpoint knot
values are retained with the span so downstream code can keep the source
parameter interval attached to the Bezier evidence.
Implementations§
Source§impl RationalBezierSpan2
impl RationalBezierSpan2
Sourcepub fn control_points(&self) -> &[Point2]
pub fn control_points(&self) -> &[Point2]
Returns exact affine control points for this retained rational span.
Sourcepub fn weights(&self) -> &[Real]
pub fn weights(&self) -> &[Real]
Returns exact homogeneous weights for this retained rational span.
Sourcepub fn knot_interval(&self) -> (&Real, &Real)
pub fn knot_interval(&self) -> (&Real, &Real)
Returns the source knot interval covered by this Bezier span.
Sourcepub fn native_subcurve(
&self,
policy: &CurvePolicy,
) -> CurveResult<Classification<BezierSubcurve2>>
pub fn native_subcurve( &self, policy: &CurvePolicy, ) -> CurveResult<Classification<BezierSubcurve2>>
Converts this retained rational Bezier span into native topology when exact.
Degree-two spans map directly to RationalQuadraticBezier2. A
degree-three rational span maps to CubicBezier2 only when all
homogeneous weights are exactly equal, because the rational Bezier basis
denominator is then the same common scale on the full parameter
interval. Every other case stays unsupported retained evidence rather
than leaking an approximate topology object.
Sourcepub fn native_topology_report(
&self,
span_index: usize,
policy: &CurvePolicy,
) -> CurveResult<Classification<RationalBezierSpanTopologyReport2>>
pub fn native_topology_report( &self, span_index: usize, policy: &CurvePolicy, ) -> CurveResult<Classification<RationalBezierSpanTopologyReport2>>
Returns the exact native-topology status for this retained rational span.
Trait Implementations§
Source§impl Clone for RationalBezierSpan2
impl Clone for RationalBezierSpan2
Source§fn clone(&self) -> RationalBezierSpan2
fn clone(&self) -> RationalBezierSpan2
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RationalBezierSpan2
impl Debug for RationalBezierSpan2
Source§impl PartialEq for RationalBezierSpan2
impl PartialEq for RationalBezierSpan2
Source§fn eq(&self, other: &RationalBezierSpan2) -> bool
fn eq(&self, other: &RationalBezierSpan2) -> bool
self and other values to be equal, and is used by ==.