Struct linestring::cgmath_3d::LineString3 [−][src]
pub struct LineString3<T> where
T: BaseFloat + Sync, { pub connected: bool, // some fields omitted }
Expand description
A 3d line string, aka polyline. If the ‘connected’ field is set the ‘as_lines()’ method will connect start point with the end-point. Todo: The builder structure of this struct needs to be revisited
Fields
connected: bool
if connected is set the as_lines() method will add an extra line connecting the first and last point
Implementations
Copies the points of the iterator into the LineString2 from_iter is already claimed for into() objects.
Copy this linestring3 into a linestring2, keeping the axes defined by ‘plane’ An axis will always try to keep it’s position (e.g. y goes to y if possible). That way the operation is reversible (with regards to axis positions).
Returns the line string as a Vec of lines Will be deprecated at some time, use self.as_lines_iter().collect() instead
Returns the line string as a iterator of lines
The iterator of as_lines_iter() does not implement ExactSizeIterator. This can be used as a work around for that problem
Return a new LineString3 containing the matrix transformed points
Moves all the elements of other
into Self
, leaving other
empty.
TODO: currently ignores if other
is connected or not.
Panics
Panics if the number of elements in the points vector overflows a usize
.
Simplify using Ramer–Douglas–Peucker algorithm adapted for 3d
Simplify using Visvalingam–Whyatt algorithm adapted for 3d. This algorithm will delete ‘points_to_delete’ of points from the polyline with the smallest area defined by one point and it’s neighbours. Simplify using Visvalingam–Whyatt algorithm. This algorithm will delete ‘points_to_delete’ of points from the polyline with the smallest area defined by one point and it’s neighbours.
Trait Implementations
Creates a value from an iterator. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for LineString3<T> where
T: RefUnwindSafe,
impl<T> Send for LineString3<T> where
T: Send,
impl<T> Sync for LineString3<T>
impl<T> Unpin for LineString3<T> where
T: Unpin,
impl<T> UnwindSafe for LineString3<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.