[−][src]Struct geom::Line
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Line
[src]
impl PartialEq<Line> for Line
[src]
impl Serialize for Line
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
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>,