pub struct HalfEdgeFaceImpl<T: HalfEdgeImplMeshType> { /* private fields */ }Expand description
A face in a mesh.
If you want to handle a non-orientable mesh, you have to use double covering.
Also, if you have inner components, you have to use multiple faces!
Implementations§
Source§impl<T: HalfEdgeImplMeshType> HalfEdgeFaceImpl<T>
impl<T: HalfEdgeImplMeshType> HalfEdgeFaceImpl<T>
Trait Implementations§
Source§impl<T: Clone + HalfEdgeImplMeshType> Clone for HalfEdgeFaceImpl<T>
impl<T: Clone + HalfEdgeImplMeshType> Clone for HalfEdgeFaceImpl<T>
Source§fn clone(&self) -> HalfEdgeFaceImpl<T>
fn clone(&self) -> HalfEdgeFaceImpl<T>
Returns a duplicate 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<T: HalfEdgeImplMeshType> Debug for HalfEdgeFaceImpl<T>
impl<T: HalfEdgeImplMeshType> Debug for HalfEdgeFaceImpl<T>
Source§impl<T: HalfEdgeImplMeshType> Default for HalfEdgeFaceImpl<T>where
T::FP: DefaultFacePayload,
impl<T: HalfEdgeImplMeshType> Default for HalfEdgeFaceImpl<T>where
T::FP: DefaultFacePayload,
Source§impl<T: HalfEdgeImplMeshType> Deletable<<T as MeshType>::F> for HalfEdgeFaceImpl<T>
impl<T: HalfEdgeImplMeshType> Deletable<<T as MeshType>::F> for HalfEdgeFaceImpl<T>
Source§impl<T: HalfEdgeImplMeshType> Face for HalfEdgeFaceImpl<T>
impl<T: HalfEdgeImplMeshType> Face for HalfEdgeFaceImpl<T>
Source§impl<T: HalfEdgeImplMeshType + MeshType3D> Face3d<T> for HalfEdgeFaceImpl<T>
impl<T: HalfEdgeImplMeshType + MeshType3D> Face3d<T> for HalfEdgeFaceImpl<T>
Source§fn vertices_crossed<'a>(
&'a self,
mesh: &'a T::Mesh,
) -> impl Iterator<Item = T::Vec> + 'a + Clone + ExactSizeIteratorwhere
T::Vertex: 'a,
fn vertices_crossed<'a>(
&'a self,
mesh: &'a T::Mesh,
) -> impl Iterator<Item = T::Vec> + 'a + Clone + ExactSizeIteratorwhere
T::Vertex: 'a,
Get an iterator over the cross products of the vertices of the face.
Source§fn is_planar2(&self, mesh: &T::Mesh) -> bool
fn is_planar2(&self, mesh: &T::Mesh) -> bool
Whether the face is planar.
Source§fn has_self_intersections(&self, mesh: &T::Mesh) -> bool
fn has_self_intersections(&self, mesh: &T::Mesh) -> bool
Whether the face is self-intersecting.
This is a quite slow O(n^2) method. Use with caution.
Source§fn is_simple(&self, mesh: &T::Mesh) -> bool
fn is_simple(&self, mesh: &T::Mesh) -> bool
Whether the face is simple, i.e., doesn’t self-intersect or have holes.
Testing this is quite slow O(n^2). Use with caution.
Source§fn normal_naive(&self, mesh: &T::Mesh) -> T::Vec
fn normal_naive(&self, mesh: &T::Mesh) -> T::Vec
A fast methods to get the surface normal, but will only work for convex faces.
Source§fn normal(&self, mesh: &T::Mesh) -> T::Vec
fn normal(&self, mesh: &T::Mesh) -> T::Vec
Get the normal of the face. Assumes the face is planar.
Uses Newell’s method to handle concave faces.
PERF: Why not faster? Can’t we find the normal using 3 vertices?
Source§fn vertices_2d<'a>(
&'a self,
mesh: &'a T::Mesh,
) -> impl Iterator<Item = (T::Vec2, T::V)> + Clone + ExactSizeIterator + 'a
fn vertices_2d<'a>( &'a self, mesh: &'a T::Mesh, ) -> impl Iterator<Item = (T::Vec2, T::V)> + Clone + ExactSizeIterator + 'a
Get an iterator over the 2d vertices of the face rotated to the XY plane.
Source§fn vec2s<'a>(&'a self, mesh: &'a T::Mesh) -> Vec<IndexedVertex2D<T::V, T::Vec2>>
fn vec2s<'a>(&'a self, mesh: &'a T::Mesh) -> Vec<IndexedVertex2D<T::V, T::Vec2>>
Get a vector of 2d vertices of the face rotated to the XY plane.
Source§fn as_polygon(&self, mesh: &T::Mesh) -> T::Poly
fn as_polygon(&self, mesh: &T::Mesh) -> T::Poly
Returns the polygon of the face rotated to the XY plane.
Source§impl<T: HalfEdgeImplMeshType> FaceBasics<T> for HalfEdgeFaceImpl<T>
impl<T: HalfEdgeImplMeshType> FaceBasics<T> for HalfEdgeFaceImpl<T>
Source§fn may_be_curved(&self) -> bool
fn may_be_curved(&self) -> bool
Whether the face is allowed to be curved.
Source§fn num_vertices(&self, mesh: &T::Mesh) -> usize
fn num_vertices(&self, mesh: &T::Mesh) -> usize
Get the number of vertices of the face.
Source§fn num_triangles(&self, mesh: &T::Mesh) -> usize
fn num_triangles(&self, mesh: &T::Mesh) -> usize
Get the number of triangles of the face. (n-2)*3
Source§fn payload_mut(&mut self) -> &mut T::FP
fn payload_mut(&mut self) -> &mut T::FP
Returns a mutable reference to the face payload.
Source§fn vertices<'a>(
&'a self,
mesh: &'a T::Mesh,
) -> impl Iterator<Item = T::Vertex> + 'a + Clone + ExactSizeIterator
fn vertices<'a>( &'a self, mesh: &'a T::Mesh, ) -> impl Iterator<Item = T::Vertex> + 'a + Clone + ExactSizeIterator
Iterates all vertices adjacent to the face
Source§fn edges<'a>(&'a self, mesh: &'a T::Mesh) -> ForwardEdgeIterator<'a, T> ⓘ
fn edges<'a>(&'a self, mesh: &'a T::Mesh) -> ForwardEdgeIterator<'a, T> ⓘ
Iterates all half-edges incident to the face
Source§fn vertex_ids<'a>(
&'a self,
mesh: &'a T::Mesh,
) -> impl Iterator<Item = T::V> + 'awhere
T: 'a,
fn vertex_ids<'a>(
&'a self,
mesh: &'a T::Mesh,
) -> impl Iterator<Item = T::V> + 'awhere
T: 'a,
Iterates all vertex ids adjacent to the face
Source§impl<T: Hash + HalfEdgeImplMeshType> Hash for HalfEdgeFaceImpl<T>
impl<T: Hash + HalfEdgeImplMeshType> Hash for HalfEdgeFaceImpl<T>
impl<T: Copy + HalfEdgeImplMeshType> Copy for HalfEdgeFaceImpl<T>
Auto Trait Implementations§
impl<T> Freeze for HalfEdgeFaceImpl<T>
impl<T> RefUnwindSafe for HalfEdgeFaceImpl<T>where
<T as MeshType>::F: RefUnwindSafe,
<T as MeshType>::E: RefUnwindSafe,
<T as MeshType>::FP: RefUnwindSafe,
impl<T> Send for HalfEdgeFaceImpl<T>
impl<T> Sync for HalfEdgeFaceImpl<T>
impl<T> Unpin for HalfEdgeFaceImpl<T>
impl<T> UnwindSafe for HalfEdgeFaceImpl<T>where
<T as MeshType>::F: UnwindSafe,
<T as MeshType>::E: UnwindSafe,
<T as MeshType>::FP: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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§fn to_subset_unchecked(&self) -> SS
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.