Trait cavalier_contours::polyline::PlineCreation
source · 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§
sourcefn with_capacity(capacity: usize, is_closed: bool) -> Self
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.
Provided Methods§
sourcefn create_from<P>(pline: &P) -> Self
fn create_from<P>(pline: &P) -> Self
Create a new polyline by cloning from an existing polyline.
sourcefn create_from_remove_repeat<P>(pline: &P, pos_equal_eps: Self::Num) -> Self
fn create_from_remove_repeat<P>(pline: &P, pos_equal_eps: Self::Num) -> Self
Same as PlineCreation::create_from but removes any repeat position vertexes in the
process using pos_equal_eps
for positional comparisons.
Object Safety§
This trait is not object safe.