pub enum TetrahedronPointLocation<N: RealField + Copy> {
OnVertex(usize),
OnEdge(usize, [N; 2]),
OnFace(usize, [N; 3]),
OnSolid,
}
Expand description
Logical 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.
The 0-st edge is the segment AB. The 1-st edge is the segment AC. The 2-nd edge is the segment AD. The 3-rd edge is the segment BC. The 4-th edge is the segment BD. The 5-th edge is the segment CD.
OnFace(usize, [N; 3])
The point lies on a triangular face interior.
The first face is the triangle ABC. The second face is the triangle ABD. The third face is the triangle ACD. The fourth face is the triangle BDC.
OnSolid
The point lies inside of the tetrahedron.
Implementations§
Source§impl<N: RealField + Copy> TetrahedronPointLocation<N>
impl<N: RealField + Copy> TetrahedronPointLocation<N>
Sourcepub fn barycentric_coordinates(&self) -> Option<[N; 4]>
pub fn barycentric_coordinates(&self) -> Option<[N; 4]>
The barycentric coordinates corresponding to this point location.
Returns None
if the location is TetrahedronPointLocation::OnSolid
.
Sourcepub fn same_feature_as(&self, other: &TetrahedronPointLocation<N>) -> bool
pub fn same_feature_as(&self, other: &TetrahedronPointLocation<N>) -> bool
Returns true
if both self
and other
correspond to points on the same feature of a tetrahedron.
Trait Implementations§
Source§impl<N: Clone + RealField + Copy> Clone for TetrahedronPointLocation<N>
impl<N: Clone + RealField + Copy> Clone for TetrahedronPointLocation<N>
Source§fn clone(&self) -> TetrahedronPointLocation<N>
fn clone(&self) -> TetrahedronPointLocation<N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl<N: Copy + RealField + Copy> Copy for TetrahedronPointLocation<N>
Auto Trait Implementations§
impl<N> Freeze for TetrahedronPointLocation<N>where
N: Freeze,
impl<N> RefUnwindSafe for TetrahedronPointLocation<N>where
N: RefUnwindSafe,
impl<N> Send for TetrahedronPointLocation<N>
impl<N> Sync for TetrahedronPointLocation<N>
impl<N> Unpin for TetrahedronPointLocation<N>where
N: Unpin,
impl<N> UnwindSafe for TetrahedronPointLocation<N>where
N: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.