[−][src]Struct geom::polyline::PolyLine
Fields
pts: Vec<Pt2D>
length: Distance
Implementations
impl PolyLine
[src]
pub fn new(pts: Vec<Pt2D>) -> Result<PolyLine, String>
[src]
pub fn must_new(pts: Vec<Pt2D>) -> PolyLine
[src]
pub fn unchecked_new(pts: Vec<Pt2D>) -> PolyLine
[src]
pub fn deduping_new(pts: Vec<Pt2D>) -> Result<PolyLine, String>
[src]
pub fn to_thick_boundary(
&self,
self_width: Distance,
boundary_width: Distance
) -> Option<Polygon>
[src]
&self,
self_width: Distance,
boundary_width: Distance
) -> Option<Polygon>
pub fn reversed(&self) -> PolyLine
[src]
pub fn extend(self, other: PolyLine) -> Result<PolyLine, String>
[src]
pub fn must_extend(self, other: PolyLine) -> PolyLine
[src]
pub fn must_push(self, pt: Pt2D) -> PolyLine
[src]
pub fn append(first: Vec<Pt2D>, second: Vec<Pt2D>) -> Result<Vec<Pt2D>, String>
[src]
pub fn points(&self) -> &Vec<Pt2D>
[src]
pub fn into_points(self) -> Vec<Pt2D>
[src]
pub fn lines(&self) -> Vec<Line>
[src]
pub fn length(&self) -> Distance
[src]
pub fn slice(
&self,
start: Distance,
end: Distance
) -> Result<(PolyLine, Distance), String>
[src]
&self,
start: Distance,
end: Distance
) -> Result<(PolyLine, Distance), String>
pub fn exact_slice(&self, start: Distance, end: Distance) -> PolyLine
[src]
pub fn maybe_exact_slice(
&self,
start: Distance,
end: Distance
) -> Result<PolyLine, String>
[src]
&self,
start: Distance,
end: Distance
) -> Result<PolyLine, String>
pub fn first_half(&self) -> PolyLine
[src]
pub fn second_half(&self) -> PolyLine
[src]
pub fn dist_along(&self, dist_along: Distance) -> Result<(Pt2D, Angle), String>
[src]
pub fn must_dist_along(&self, dist_along: Distance) -> (Pt2D, Angle)
[src]
pub fn middle(&self) -> Pt2D
[src]
pub fn first_pt(&self) -> Pt2D
[src]
pub fn last_pt(&self) -> Pt2D
[src]
pub fn first_line(&self) -> Line
[src]
pub fn last_line(&self) -> Line
[src]
pub fn shift_right(&self, width: Distance) -> Result<PolyLine, String>
[src]
pub fn must_shift_right(&self, width: Distance) -> PolyLine
[src]
pub fn shift_left(&self, width: Distance) -> Result<PolyLine, String>
[src]
pub fn must_shift_left(&self, width: Distance) -> PolyLine
[src]
fn shift_with_corrections(&self, width: Distance) -> Result<PolyLine, String>
[src]
fn shift_with_sharp_angles(
&self,
width: Distance,
miter_threshold: f64
) -> Vec<Pt2D>
[src]
&self,
width: Distance,
miter_threshold: f64
) -> Vec<Pt2D>
pub fn make_polygons(&self, width: Distance) -> Polygon
[src]
pub fn make_polygons_with_miter_threshold(
&self,
width: Distance,
miter_threshold: f64
) -> Polygon
[src]
&self,
width: Distance,
miter_threshold: f64
) -> Polygon
pub fn exact_dashed_polygons(
&self,
width: Distance,
dash_len: Distance,
dash_separation: Distance
) -> Vec<Polygon>
[src]
&self,
width: Distance,
dash_len: Distance,
dash_separation: Distance
) -> Vec<Polygon>
pub fn dashed_lines(
&self,
width: Distance,
dash_len: Distance,
dash_separation: Distance
) -> Vec<Polygon>
[src]
&self,
width: Distance,
dash_len: Distance,
dash_separation: Distance
) -> Vec<Polygon>
pub fn make_arrow(&self, thickness: Distance, cap: ArrowCap) -> Polygon
[src]
pub fn make_double_arrow(&self, thickness: Distance, cap: ArrowCap) -> Polygon
[src]
pub fn dashed_arrow(
&self,
width: Distance,
dash_len: Distance,
dash_separation: Distance,
cap: ArrowCap
) -> Vec<Polygon>
[src]
&self,
width: Distance,
dash_len: Distance,
dash_separation: Distance,
cap: ArrowCap
) -> Vec<Polygon>
pub fn intersection(&self, other: &PolyLine) -> Option<(Pt2D, Angle)>
[src]
pub fn intersection_infinite(&self, other: &InfiniteLine) -> Option<Pt2D>
[src]
pub fn get_slice_ending_at(&self, pt: Pt2D) -> Option<PolyLine>
[src]
pub fn get_slice_starting_at(&self, pt: Pt2D) -> Option<PolyLine>
[src]
pub fn dist_along_of_point(&self, pt: Pt2D) -> Option<(Distance, Angle)>
[src]
pub fn trim_to_endpts(&self, pt1: Pt2D, pt2: Pt2D) -> PolyLine
[src]
pub fn get_bounds(&self) -> Bounds
[src]
pub fn extend_to_length(&self, min_len: Distance) -> PolyLine
[src]
Trait Implementations
impl Clone for PolyLine
[src]
impl Debug for PolyLine
[src]
impl<'de> Deserialize<'de> for PolyLine
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for PolyLine
[src]
impl PartialEq<PolyLine> for PolyLine
[src]
impl Serialize for PolyLine
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for PolyLine
[src]
Auto Trait Implementations
impl RefUnwindSafe for PolyLine
impl Send for PolyLine
impl Sync for PolyLine
impl Unpin for PolyLine
impl UnwindSafe for PolyLine
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,