Struct line_intersection::LineInterval
[−]
[src]
pub struct LineInterval<T: Float> { pub line: Line<T>, pub interval_of_intersection: (T, T), }
An interval (continuous subset) of a line.
interval_of_intersection
represents what subset of a line this LineInterval
represents. If
interval_of_intersection
is [-Infinity, Infinity]
, then it's a line going through
line.start
and line.end
; if it's [0, Infinity]
it's a ray, starting at line.start
extending infinitely in the direction of line.end
and beyond; if it's [0, 1]
, it's a line
segment from line.from
to line.end
.
It should always be the case that interval_of_intersection.0 < interval_of_intersection.1
,
unless you want a degenerate line that cannot be intersected.
Fields
line: Line<T>
interval_of_intersection: (T, T)
Methods
impl<T: Float> LineInterval<T>
[src]
fn line_segment(line: Line<T>) -> LineInterval<T>
[src]
fn ray(line: Line<T>) -> LineInterval<T>
[src]
fn line(line: Line<T>) -> LineInterval<T>
[src]
fn relate(&self, other: &LineInterval<T>) -> LineRelation<T>
[src]
Get the relationship between this line segment and another.
Trait Implementations
impl<T: Debug + Float> Debug for LineInterval<T>
[src]
impl<T: PartialEq + Float> PartialEq for LineInterval<T>
[src]
fn eq(&self, __arg_0: &LineInterval<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &LineInterval<T>) -> bool
[src]
This method tests for !=
.