pub trait PlineCreation: PlineSourceMut + Sized {
    // Required methods
    fn with_capacity(capacity: usize, is_closed: bool) -> Self;
    fn from_iter<I>(iter: I, is_closed: bool) -> Self
       where I: Iterator<Item = PlineVertex<Self::Num>>;

    // Provided methods
    fn create_from<P>(pline: &P) -> Self
       where P: PlineSource<Num = Self::Num> + ?Sized { ... }
    fn create_from_remove_repeat<P>(pline: &P, pos_equal_eps: Self::Num) -> Self
       where P: PlineSource<Num = Self::Num> + ?Sized { ... }
    fn empty() -> Self { ... }
}
Expand description

Trait representing a creatable source of polyline data. This trait acts as a mutable polyline source and also exposes associated functions for construction. This trait is used when new polylines need to be returned from a function.

See other core polyline traits: PlineSource and PlineSourceMut for more information.

Required Methods§

source

fn with_capacity(capacity: usize, is_closed: bool) -> Self

Create a new empty polyline with capacity given and is_closed indicating whether it is a closed or open polyline.

source

fn from_iter<I>(iter: I, is_closed: bool) -> Self
where I: Iterator<Item = PlineVertex<Self::Num>>,

Create a new polyline by constructing from vertexes given by an iterator, is_closed sets whether the created polyline is closed or open.

Provided Methods§

source

fn create_from<P>(pline: &P) -> Self
where P: PlineSource<Num = Self::Num> + ?Sized,

Create a new polyline by cloning from an existing polyline.

source

fn create_from_remove_repeat<P>(pline: &P, pos_equal_eps: Self::Num) -> Self
where P: PlineSource<Num = Self::Num> + ?Sized,

Same as PlineCreation::create_from but removes any repeat position vertexes in the process using pos_equal_eps for positional comparisons.

source

fn empty() -> Self

Create empty polyline with is_closed set to false.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> PlineCreation for Polyline<T>
where T: Real,