Skip to main content

ChainPositionTable

Struct ChainPositionTable 

Source
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

Source

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.

Source

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.

Source

pub fn point2_on(&self, s: f64, side: SeamSide) -> Option<(DVec2, f64)>

Self::point2 on side of a join.

Source

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.

Source

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.

Source

pub fn max_error(&self) -> f64

A certified bound on the error of every point the table returns.

Source

pub fn max_tangent_error(&self) -> f64

A certified bound on the error of every tangent the table returns.

Source

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

Source§

fn clone(&self) -> ChainPositionTable

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ChainPositionTable

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.