Skip to main content

RoutePath

Struct RoutePath 

Source
pub struct RoutePath {
    pub chain: Chain<NurbCurve3D>,
    pub places: Vec<String>,
}
Expand description

A route: a chain of lines and arcs through waypoints, named for the solid swept along it — w{i} the i-th waypoint, m{i} where the two arcs between it and the next meet, a{i} the arc from w{i} to m{i} (or the line from w{i} to w{i+1}, if both are straight) and b{i} the arc from m{i} on.

Fields§

§chain: Chain<NurbCurve3D>§places: Vec<String>

Where each curve of the chain lies, as the route says it: between point 1 (…) and point 2 (…).

Implementations§

Source§

impl RoutePath

Source

pub fn through(waypoints: &[Waypoint]) -> GeopResult<Self>

The route through waypoints, in order (see the module docs). Where a waypoint leaves the direction free, the route chooses it: in between, it turns as much before as after, along the bisector of the chords to its neighbours; at an end, it bends into the next waypoint’s direction in one arc — or runs straight, between two free ends.

Source

pub fn measure(&self) -> GeopResult<Measure>

How long the route is and where it bends how tightly. Its curves are lines and arcs — what RoutePath::through builds; a chain with any other curve is not measured.

Trait Implementations§

Source§

impl Clone for RoutePath

Source§

fn clone(&self) -> RoutePath

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 RoutePath

Source§

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

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.