13 #ifndef EBGeometry_DCEL_Mesh
14 #define EBGeometry_DCEL_Mesh
44 template <
class T,
class Meta>
213 inline std::vector<
Vec3T<T>>
225 inline const std::vector<
EdgePtr>&
237 inline const std::vector<
FacePtr>&
364 incrementWarning(std::map<std::
string,
size_t>& a_warnings, const std::
string& a_warn) const noexcept;
370 printWarnings(const std::map<std::
string,
size_t>& a_warnings) const noexcept;
374 #include "EBGeometry_NamespaceFooter.hpp"
376 #include "EBGeometry_DCEL_MeshImplem.hpp"
Declaration of a two-dimensional polygon class for embedding 3D polygon faces.
Edge class.
Definition: EBGeometry_DCEL_Edge.hpp:47
Face class.
Definition: EBGeometry_DCEL_Face.hpp:49
Mesh class.
Definition: EBGeometry_DCEL_Mesh.hpp:46
T unsignedDistance2(const Vec3 &a_x0) const noexcept
Compute the unsigned square distance from a point to this mesh.
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer type.
Definition: EBGeometry_DCEL_Mesh.hpp:96
std::vector< VertexPtr > m_vertices
Mesh vertices.
Definition: EBGeometry_DCEL_Mesh.hpp:285
void reconcileVertices(const DCEL::VertexNormalWeight a_weight) noexcept
Function which computes internal things for the vertices.
std::vector< FacePtr > m_faces
Mesh faces.
Definition: EBGeometry_DCEL_Mesh.hpp:295
SearchAlgorithm
Possible search algorithms for DCEL::MeshT.
Definition: EBGeometry_DCEL_Mesh.hpp:54
void reconcileEdges() noexcept
Function which computes internal things for the half-edges.
VertexNormalWeight
How to weight vertex normal.
Definition: EBGeometry_DCEL_Mesh.hpp:63
std::vector< EdgePtr > & getEdges() noexcept
Get modifiable half-edges in this mesh.
void define(std::vector< FacePtr > &a_faces, std::vector< EdgePtr > &a_edges, std::vector< VertexPtr > &a_vertices) noexcept
Define function. Puts Mesh in usable state.
void flipEdges() noexcept
Flip all edge normals.
std::shared_ptr< Face > FacePtr
Alias for face pointer type.
Definition: EBGeometry_DCEL_Mesh.hpp:106
void setSearchAlgorithm(const SearchAlgorithm a_algorithm) noexcept
Search algorithm for direct signed distance computations.
void flipFaces() noexcept
Flip all face normals.
void reconcile(const DCEL::VertexNormalWeight a_weight=DCEL::VertexNormalWeight::Angle) noexcept
Reconcile function which computes the internal parameters in vertices, edges, and faces for use with ...
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer type.
Definition: EBGeometry_DCEL_Mesh.hpp:101
std::vector< FacePtr > & getFaces() noexcept
Get modifiable faces in this mesh.
std::vector< VertexPtr > & getVertices() noexcept
Get modifiable vertices in this mesh.
void sanityCheck() const noexcept
Perform a sanity check.
std::vector< EdgePtr > m_edges
Mesh half-edges.
Definition: EBGeometry_DCEL_Mesh.hpp:290
void incrementWarning(std::map< std::string, size_t > &a_warnings, const std::string &a_warn) const noexcept
Increment a warning. This is used in sanityCheck() for locating holes or bad inputs in the mesh.
void flipVertices() noexcept
Flip all vertex normal.
T DirectSignedDistance(const Vec3 &a_point) const noexcept
Implementation of signed distance function which iterates through all faces.
void flip() noexcept
Flip the mesh, making all the normals change direction.
void setInsideOutsideAlgorithm(typename Polygon2D< T >::InsideOutsideAlgorithm a_algorithm) noexcept
Set the inside/outside algorithm to use when computing the signed distance to polygon faces.
void reconcileFaces() noexcept
Function which computes internal things for the polygon faces.
T DirectSignedDistance2(const Vec3 &a_point) const noexcept
Implementation of squared signed distance function which iterates through all faces.
T signedDistance(const Vec3 &a_x0) const noexcept
Compute the signed distance from a point to this mesh.
std::vector< Vec3T< T > > getAllVertexCoordinates() const noexcept
Return all vertex coordinates in the mesh.
MeshT() noexcept
Default constructor. Leaves unobject in an unusable state.
void printWarnings(const std::map< std::string, size_t > &a_warnings) const noexcept
Print all warnings to std::cerr.
SearchAlgorithm m_algorithm
Search algorithm. Only used in signed distance functions.
Definition: EBGeometry_DCEL_Mesh.hpp:280
Vertex class.
Definition: EBGeometry_DCEL_Vertex.hpp:40
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.