Enum ncollide2d::shape::TrianglePointLocation
source · pub enum TrianglePointLocation<N: Real> {
OnVertex(usize),
OnEdge(usize, [N; 2]),
OnFace([N; 3]),
OnSolid,
}
Expand description
Description of the location of a point on a triangle.
Variants§
OnVertex(usize)
The point lies on a vertex.
OnEdge(usize, [N; 2])
The point lies on an edge.
OnFace([N; 3])
The point lies on the triangle interior.
OnSolid
The point lies on the triangle interior (for “solid” point queries).
Implementations§
source§impl<N: Real> TrianglePointLocation<N>
impl<N: Real> TrianglePointLocation<N>
sourcepub fn is_on_face(&self) -> bool
pub fn is_on_face(&self) -> bool
Returns true
if the point is located on the relative interior of the triangle.
Trait Implementations§
source§impl<N: Clone + Real> Clone for TrianglePointLocation<N>
impl<N: Clone + Real> Clone for TrianglePointLocation<N>
source§fn clone(&self) -> TrianglePointLocation<N>
fn clone(&self) -> TrianglePointLocation<N>
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 moreimpl<N: Copy + Real> Copy for TrianglePointLocation<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for TrianglePointLocation<N>where
N: RefUnwindSafe,
impl<N> Send for TrianglePointLocation<N>
impl<N> Sync for TrianglePointLocation<N>
impl<N> Unpin for TrianglePointLocation<N>where
N: Unpin,
impl<N> UnwindSafe for TrianglePointLocation<N>where
N: UnwindSafe,
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§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 moresource§fn 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).source§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.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.