Enum geo::algorithm::line_intersection::LineIntersection
source · pub enum LineIntersection<F: GeoFloat> {
SinglePoint {
intersection: Coord<F>,
is_proper: bool,
},
Collinear {
intersection: Line<F>,
},
}
Variants§
SinglePoint
Fields
§
is_proper: bool
For Lines which intersect in a single point, that point may be either an endpoint or in the interior of each Line. If the point lies in the interior of both Lines, we call it a proper intersection.
Note
Due to the limited precision of most float data-types, the
calculated intersection point may be snapped to one of the
end-points even though all the end-points of the two
lines are distinct points. In such cases, this field is
still set to true
. Please refer test_case:
test_central_endpoint_heuristic_failure_1
for such an
example.
Lines intersect in a single point
Collinear
Overlapping Lines intersect in a line segment
Implementations§
Trait Implementations§
source§impl<F: Clone + GeoFloat> Clone for LineIntersection<F>
impl<F: Clone + GeoFloat> Clone for LineIntersection<F>
source§fn clone(&self) -> LineIntersection<F>
fn clone(&self) -> LineIntersection<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<F: PartialEq + GeoFloat> PartialEq for LineIntersection<F>
impl<F: PartialEq + GeoFloat> PartialEq for LineIntersection<F>
source§fn eq(&self, other: &LineIntersection<F>) -> bool
fn eq(&self, other: &LineIntersection<F>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<F: Copy + GeoFloat> Copy for LineIntersection<F>
impl<F: Eq + GeoFloat> Eq for LineIntersection<F>
impl<F: GeoFloat> StructuralEq for LineIntersection<F>
impl<F: GeoFloat> StructuralPartialEq for LineIntersection<F>
Auto Trait Implementations§
impl<F> RefUnwindSafe for LineIntersection<F>where F: RefUnwindSafe,
impl<F> Send for LineIntersection<F>where F: Send,
impl<F> Sync for LineIntersection<F>where F: Sync,
impl<F> Unpin for LineIntersection<F>where F: Unpin,
impl<F> UnwindSafe for LineIntersection<F>where F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more