pub struct ChainPositionTable { /* private fields */ }Expand description
Certified positions, unit tangents and curvature vectors of an
arc-length chain over [0, end], read in any order; see the module
documentation.
Implementations§
Source§impl ChainPositionTable
impl ChainPositionTable
Sourcepub fn new(chain: &Chain2, error: f64, end: f64) -> Option<ChainPositionTable>
pub fn new(chain: &Chain2, error: f64, end: f64) -> Option<ChainPositionTable>
The table over [0, end], its points within about error; None
for a malformed chain (or a parametric piece off its local frame), an
error or end that is not finite and positive, an end past the chain,
an intrinsic piece whose law has no closed-form bound of k to
k''', a parametric piece of a family other than a line, a circle,
an ellipse or a B-spline, a piece longer than its curve, a curve
without a positive speed floor on a panel, or a budget exhausted.
Sourcepub fn point2(&self, s: f64) -> Option<(DVec2, f64)>
pub fn point2(&self, s: f64) -> Option<(DVec2, f64)>
The point at arc length s as the evaluator reads it (a join belongs
to the piece that starts there), and a certified bound on its
distance from the exact point. None outside [0, end], or where a
piece refuses the read.
Sourcepub fn point2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>
pub fn point2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>
Self::point2 on side of a join.
Sourcepub fn tangent2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>
pub fn tangent2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>
The tangent at s on side, and a certified bound on its distance
from the exact tangent.
Sourcepub fn curvature2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>
pub fn curvature2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>
p''(s) in arc length (k n) on side, and a certified bound on its
distance from the exact one. Where a piece’s curvature law has a seam
inside, the value is the left one, as the evaluator reads it.
Sourcepub fn max_error(&self) -> f64
pub fn max_error(&self) -> f64
A certified bound on the error of every point the table returns.
Sourcepub fn max_tangent_error(&self) -> f64
pub fn max_tangent_error(&self) -> f64
A certified bound on the error of every tangent the table returns.
Sourcepub fn max_curvature_error(&self) -> f64
pub fn max_curvature_error(&self) -> f64
A certified bound on the error of every curvature vector the table returns.
Trait Implementations§
Source§impl Clone for ChainPositionTable
impl Clone for ChainPositionTable
Source§fn clone(&self) -> ChainPositionTable
fn clone(&self) -> ChainPositionTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more