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 moreAuto Trait Implementations§
impl Freeze for ChainPositionTable
impl RefUnwindSafe for ChainPositionTable
impl Send for ChainPositionTable
impl Sync for ChainPositionTable
impl Unpin for ChainPositionTable
impl UnsafeUnpin for ChainPositionTable
impl UnwindSafe for ChainPositionTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more