Struct geo::Line [] [src]

pub struct Line<T> where
    T: Float
{ pub start: Point<T>, pub end: Point<T>, }

Fields

Methods

impl<T> Line<T> where
    T: Float
[src]

Creates a new line segment.

use geo::{Point, Line};

let line = Line::new(Point::new(0., 0.), Point::new(1., 2.));

assert_eq!(line.start, Point::new(0., 0.));
assert_eq!(line.end, Point::new(1., 2.));

Trait Implementations

impl<T: PartialEq> PartialEq for Line<T> where
    T: Float
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Clone> Clone for Line<T> where
    T: Float
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for Line<T> where
    T: Float
[src]

Formats the value using the given formatter.

impl<T> Centroid<T> for Line<T> where
    T: Float
[src]

impl<T> Contains<Point<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A is completely inside the B geometry. Read more

impl<T> Contains<Line<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A is completely inside the B geometry. Read more

impl<T> Contains<LineString<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A is completely inside the B geometry. Read more

impl<T> Intersects<Point<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A intersects the geometry B. Read more

impl<T> Intersects<Line<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A intersects the geometry B. Read more

impl<T> Intersects<LineString<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A intersects the geometry B. Read more

impl<T> Intersects<Polygon<T>> for Line<T> where
    T: Float
[src]

Checks if the geometry A intersects the geometry B. Read more

impl<T> Area<T> for Line<T> where
    T: Float
[src]

impl<T> Length<T> for Line<T> where
    T: Float
[src]

Calculation of the length of a Line Read more

impl<T> Distance<T, Point<T>> for Line<T> where
    T: Float
[src]

Minimum distance from a Line to a Point

impl<T> BoundingBox<T> for Line<T> where
    T: Float
[src]

Return the Bounding Box of a geometry Read more

impl<T> Rotate<T> for Line<T> where
    T: Float
[src]

Rotate a Geometry around its centroid by an angle, in degrees Read more

impl<T> RotatePoint<T> for Line<T> where
    T: Float
[src]

Rotate a Geometry around an arbitrary point by an angle, given in degrees Read more