13#ifndef EBGeometry_DCEL_Face
14#define EBGeometry_DCEL_Face
47 template <
class T,
class Meta>
373#include "EBGeometry_NamespaceFooter.hpp"
375#include "EBGeometry_DCEL_FaceImplem.hpp"
Declaration of a half-edge class for use in DCEL descriptions of polygon tesselations.
Declaration of a vertex class for use in DCEL descriptions of polygon tesselations.
Declaration of a two-dimensional polygon class for embedding 3D polygon faces.
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Face class.
Definition EBGeometry_DCEL_Face.hpp:49
void normalizeNormalVector() noexcept
Normalize the normal vector, ensuring it has a length of 1.
virtual ~FaceT()
Destructor (does nothing)
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer type.
Definition EBGeometry_DCEL_Face.hpp:74
Vec3T< T > getHighestCoordinate() const noexcept
Get the upper-right-most coordinate of this polygon face.
void setHalfEdge(const EdgePtr &a_halfEdge) noexcept
Set the half edge.
Vec3T< T > & getCentroid() noexcept
Get modifiable centroid.
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer type.
Definition EBGeometry_DCEL_Face.hpp:79
EdgePtr m_halfEdge
This polygon's half-edge. A valid face will always have != nullptr.
Definition EBGeometry_DCEL_Face.hpp:285
std::vector< VertexPtr > gatherVertices() const noexcept
Return all the vertices on this polygon.
Meta & getMetaData() noexcept
Get meta-data.
Vec3 m_normal
Polygon face normal vector.
Definition EBGeometry_DCEL_Face.hpp:290
void reconcile() noexcept
Reconcile face. This will compute the normal vector, area, centroid, and the 2D embedding of the poly...
void computePolygon2D() noexcept
Compute the 2D embedding of this polygon.
EdgePtr & getHalfEdge() noexcept
Get modifiable half-edge.
FaceT(const EdgePtr &a_edge)
Partial constructor. Calls default constructor but associates a half-edge.
Polygon2D< T >::InsideOutsideAlgorithm m_poly2Algorithm
Algorithm for inside/outside tests.
Definition EBGeometry_DCEL_Face.hpp:311
std::shared_ptr< Face > FacePtr
Alias for face pointer type.
Definition EBGeometry_DCEL_Face.hpp:84
T signedDistance(const Vec3 &a_x0) const noexcept
Compute the signed distance to a point.
Vec3T< T > projectPointIntoFacePlane(const Vec3 &a_p) const noexcept
Compute the projection of a point onto the polygon face plane.
void computeNormal() noexcept
Compute the normal position of this polygon.
void setInsideOutsideAlgorithm(typename Polygon2D< T >::InsideOutsideAlgorithm &a_algorithm) noexcept
Set the inside/outside algorithm when determining if a point projects to the inside or outside of the...
Vec3 m_centroid
Polygon face centroid position.
Definition EBGeometry_DCEL_Face.hpp:295
std::vector< EdgePtr > gatherEdges() const noexcept
Return all the half-edges on this polygon.
T computeArea() noexcept
Compute the area of this polygon.
void computeCentroid() noexcept
Compute the centroid position of this polygon.
void flip() noexcept
Flip the normal vector.
T getArea() noexcept
Get the area of this polygon face.
Meta m_metaData
Meta-data attached to this face.
Definition EBGeometry_DCEL_Face.hpp:300
Vec3T< T > & getNormal() noexcept
Get modifiable normal vector.
FaceT(const Face &a_otherFace)
Partial constructor.
T unsignedDistance2(const Vec3 &a_x0) const noexcept
Compute the unsigned squared distance to a point.
std::shared_ptr< Polygon2D< T > > m_poly2
2D embedding of this polygon. This is the 2D view of the current object projected along its normal ve...
Definition EBGeometry_DCEL_Face.hpp:306
void define(const Vec3 &a_normal, const EdgePtr &a_edge) noexcept
Define function which sets the normal vector and half-edge.
FaceT()
Default constructor. Sets the half-edge to zero and the inside/outside algorithm to crossing number a...
bool isPointInsideFace(const Vec3 &a_p) const noexcept
Check if a point projects to inside or outside the polygon face.
Vec3T< T > getSmallestCoordinate() const noexcept
Get the lower-left-most coordinate of this polygon face.
std::vector< Vec3T< T > > getAllVertexCoordinates() const noexcept
Return the coordinates of all the vertices on this polygon.
void computeAndStoreEdges() noexcept
Compute and store all the half-edges around this polygon face.
Class for embedding a polygon face into 2D.
Definition EBGeometry_Polygon2D.hpp:43
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218
Namespace containing various double-connected edge list (DCEL) functionality.