Struct spade::primitives::EdgeSideInfo
source · pub struct EdgeSideInfo<S> { /* private fields */ }
Expand description
Yields information on which side of a line a point lies.
Implementations
sourceimpl<S> EdgeSideInfo<S>where
S: SpadeNum,
impl<S> EdgeSideInfo<S>where
S: SpadeNum,
sourcepub fn is_on_left_side(&self) -> bool
pub fn is_on_left_side(&self) -> bool
Returns true
if the query point lies on the left side of the query edge.
sourcepub fn is_on_right_side(&self) -> bool
pub fn is_on_right_side(&self) -> bool
Returns true
if the query point lies on the right side of the query edge.
sourcepub fn is_on_left_side_or_on_line(&self) -> bool
pub fn is_on_left_side_or_on_line(&self) -> bool
Returns true
if the query point lies on the left side or on the query edge.
sourcepub fn is_on_right_side_or_on_line(&self) -> bool
pub fn is_on_right_side_or_on_line(&self) -> bool
Returns true
if the query point lies on the right side or on the query edge.
sourcepub fn is_on_line(&self) -> bool
pub fn is_on_line(&self) -> bool
Returns true
if the query point lies on an infinite line going
through the edge’s start and end point.
sourcepub fn reversed(&self) -> EdgeSideInfo<S>
pub fn reversed(&self) -> EdgeSideInfo<S>
Inverts this edge side information. If this information indicates the position of a point P relative to an edge A -> B, the inverted information will indicate the relative position of P relative to the edge B -> A.
Trait Implementations
sourceimpl<S: Clone> Clone for EdgeSideInfo<S>
impl<S: Clone> Clone for EdgeSideInfo<S>
sourcefn clone(&self) -> EdgeSideInfo<S>
fn clone(&self) -> EdgeSideInfo<S>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<S: Debug> Debug for EdgeSideInfo<S>
impl<S: Debug> Debug for EdgeSideInfo<S>
sourceimpl<S> PartialEq<EdgeSideInfo<S>> for EdgeSideInfo<S>where
S: SpadeNum,
impl<S> PartialEq<EdgeSideInfo<S>> for EdgeSideInfo<S>where
S: SpadeNum,
sourcefn eq(&self, other: &EdgeSideInfo<S>) -> bool
fn eq(&self, other: &EdgeSideInfo<S>) -> bool
impl<S: Copy> Copy for EdgeSideInfo<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for EdgeSideInfo<S>where
S: RefUnwindSafe,
impl<S> Send for EdgeSideInfo<S>where
S: Send,
impl<S> Sync for EdgeSideInfo<S>where
S: Sync,
impl<S> Unpin for EdgeSideInfo<S>where
S: Unpin,
impl<S> UnwindSafe for EdgeSideInfo<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.