Type Definition fenris_geometry::Line2d

source ·
pub type Line2d<T> = Line<T, U2>;

Implementations§

source§

impl<T> Line2d<T>where
    T: Real,

source

pub fn intersect(&self, other: &Line2d<T>) -> Option<Point2<T>>

source

pub fn intersect_line_parametric(&self, other: &Line2d<T>) -> Option<(T, T)>

Computes the intersection of two lines, if any.

Let all points on each line segment be defined by the relation x1 = a1 + t1 * d1 for 0 <= t1 <= 1, and similarly for t2. Here, t1 is the parameter associated with self, and t2 is the parameter associated with other.

source

pub fn intersect_disk(&self, disk: &Disk<T>) -> Option<LineSegment2d<T>>

source

pub fn intersect_disk_parametric(&self, disk: &Disk<T>) -> Option<[T; 2]>