[][src]Struct geom::Line

pub struct Line(Pt2D, Pt2D);

Segment, technically. Should rename.

Implementations

impl Line[src]

pub fn new(pt1: Pt2D, pt2: Pt2D) -> Option<Line>[src]

pub fn must_new(pt1: Pt2D, pt2: Pt2D) -> Line[src]

pub fn infinite(&self) -> InfiniteLine[src]

pub fn pt1(&self) -> Pt2D[src]

pub fn pt2(&self) -> Pt2D[src]

pub fn points(&self) -> Vec<Pt2D>[src]

pub fn to_polyline(&self) -> PolyLine[src]

pub fn make_polygons(&self, thickness: Distance) -> Polygon[src]

pub fn length(&self) -> Distance[src]

pub fn intersection(&self, other: &Line) -> Option<Pt2D>[src]

pub fn crosses(&self, other: &Line) -> bool[src]

An intersection that isn't just two endpoints touching

pub fn intersection_infinite(&self, other: &InfiniteLine) -> Option<Pt2D>[src]

pub fn shift_right(&self, width: Distance) -> Line[src]

pub fn shift_left(&self, width: Distance) -> Line[src]

pub fn shift_either_direction(&self, width: Distance) -> Line[src]

pub fn reverse(&self) -> Line[src]

pub fn angle(&self) -> Angle[src]

pub fn dist_along(&self, dist: Distance) -> Option<Pt2D>[src]

pub fn must_dist_along(&self, dist: Distance) -> Pt2D[src]

pub fn unbounded_dist_along(&self, dist: Distance) -> Pt2D[src]

pub fn unbounded_percent_along(&self, percent: f64) -> Pt2D[src]

pub fn percent_along(&self, percent: f64) -> Option<Pt2D>[src]

pub fn slice(&self, from: Distance, to: Distance) -> Option<Line>[src]

pub fn middle(&self) -> Option<Pt2D>[src]

pub fn contains_pt(&self, pt: Pt2D) -> bool[src]

pub fn dist_along_of_point(&self, pt: Pt2D) -> Option<Distance>[src]

pub fn percent_along_of_point(&self, pt: Pt2D) -> Option<f64>[src]

pub fn project_pt(&self, pt: Pt2D) -> Pt2D[src]

Trait Implementations

impl Clone for Line[src]

impl Debug for Line[src]

impl<'de> Deserialize<'de> for Line[src]

impl Display for Line[src]

impl PartialEq<Line> for Line[src]

impl Serialize for Line[src]

impl StructuralPartialEq for Line[src]

Auto Trait Implementations

impl RefUnwindSafe for Line

impl Send for Line

impl Sync for Line

impl Unpin for Line

impl UnwindSafe for Line

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.