pub enum TetrahedronPointLocation {
OnVertex(u32),
OnEdge(u32, [f32; 2]),
OnFace(u32, [f32; 3]),
OnSolid,
}
Expand description
Logical description of the location of a point on a triangle.
Variants
OnVertex(u32)
The point lies on a vertex.
OnEdge(u32, [f32; 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(u32, [f32; 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
sourceimpl TetrahedronPointLocation
impl TetrahedronPointLocation
sourcepub fn barycentric_coordinates(&self) -> Option<[f32; 4]>
pub fn barycentric_coordinates(&self) -> Option<[f32; 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) -> bool
pub fn same_feature_as(&self, other: &TetrahedronPointLocation) -> bool
Returns true
if both self
and other
correspond to points on the same feature of a tetrahedron.
Trait Implementations
sourceimpl Clone for TetrahedronPointLocation
impl Clone for TetrahedronPointLocation
sourcefn clone(&self) -> TetrahedronPointLocation
fn clone(&self) -> TetrahedronPointLocation
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for TetrahedronPointLocation
impl Debug for TetrahedronPointLocation
impl Copy for TetrahedronPointLocation
Auto Trait Implementations
impl RefUnwindSafe for TetrahedronPointLocation
impl Send for TetrahedronPointLocation
impl Sync for TetrahedronPointLocation
impl Unpin for TetrahedronPointLocation
impl UnwindSafe for TetrahedronPointLocation
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist. Read moresourceimpl<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
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn 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. Read morefn 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. Read moresourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
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>
self
from the equivalent element of its
superset. Read morefn 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).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.