12#ifndef EBGEOMETRY_DCEL_MESH_HPP
13#define EBGEOMETRY_DCEL_MESH_HPP
48template <
class T,
class Meta>
51 static_assert(std::is_floating_point_v<T>,
"MeshT requires a floating-point T");
423#include "EBGeometry_DCEL_MeshImplem.hpp"
Declaration of a two-dimensional polygon class for embedding 3D polygon faces.
DCEL mesh class - stores a doubly-connected edge mesh.
Definition EBGeometry_DCEL_Mesh.hpp:50
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 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::vector< FacePtr > & getFaces() noexcept
Get modifiable faces in this mesh.
void reconcileVertices(const DCEL::VertexNormalWeight a_weight) noexcept
Function which computes internal things for the vertices.
std::shared_ptr< Face > FacePtr
Alias for face pointer type.
Definition EBGeometry_DCEL_Mesh.hpp:104
std::vector< FacePtr > m_faces
Mesh faces.
Definition EBGeometry_DCEL_Mesh.hpp:338
std::shared_ptr< Mesh > deepCopy() const
Create an independent, fully-decoupled copy of this mesh.
T unsignedDistance2(const Vec3 &a_x0) const noexcept
Compute the unsigned square distance from a point to this mesh.
std::vector< EdgePtr > & getEdges() noexcept
Get modifiable half-edges in this mesh.
std::vector< Vec3T< T > > getAllVertexCoordinates() const noexcept
Return all vertex coordinates in the mesh.
SearchAlgorithm
Possible search algorithms for DCEL::MeshT.
Definition EBGeometry_DCEL_Mesh.hpp:58
void flip() noexcept
Flip the mesh, making all the normals change direction.
T DirectSignedDistance2(const Vec3 &a_point) const noexcept
Implementation of squared signed distance function which iterates through all faces.
void printWarnings(const std::map< std::string, size_t > &a_warnings, const std::string &a_id) const
Print all warnings to std::cerr.
std::vector< VertexPtr > & getVertices() noexcept
Get modifiable vertices in this mesh.
void sanityCheck(const std::string a_id) const
Perform a sanity check.
MeshT() noexcept=default
Default constructor.
void reconcileFaces() noexcept
Function which computes internal things for the polygon faces.
SearchAlgorithm m_algorithm
Search algorithm. Only used in signed distance functions.
Definition EBGeometry_DCEL_Mesh.hpp:323
void setSearchAlgorithm(const SearchAlgorithm a_algorithm) noexcept
Search algorithm for direct signed distance computations.
std::vector< VertexPtr > m_vertices
Mesh vertices.
Definition EBGeometry_DCEL_Mesh.hpp:328
void reconcileEdges() noexcept
Function which computes internal things for the half-edges.
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer type.
Definition EBGeometry_DCEL_Mesh.hpp:99
std::vector< EdgePtr > m_edges
Mesh half-edges.
Definition EBGeometry_DCEL_Mesh.hpp:333
void flipFaceNormals() noexcept
Flip all face normals.
void incrementWarning(std::map< std::string, size_t > &a_warnings, const std::string &a_warn) const
Increment a warning. This is used in sanityCheck() for locating holes or bad inputs in the mesh.
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer type.
Definition EBGeometry_DCEL_Mesh.hpp:94
T signedDistance(const Vec3 &a_x0) const noexcept
Compute the signed distance from a point to this mesh.
T DirectSignedDistance(const Vec3 &a_point) const noexcept
Implementation of signed distance function which iterates through all faces.
void flipVertexNormals() noexcept
Flip all vertex normals.
void flipEdgeNormals() noexcept
Flip all edge normals.
Class for embedding a polygon face into 2D.
Definition EBGeometry_Polygon2D.hpp:46
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
VertexNormalWeight
Various supported vertex normal vector calculation methods.
Definition EBGeometry_DCEL.hpp:74
@ Angle
Angle-weighted pseudonormal (Baerentzen and Aanes, DOI: 10.1109/TVCG.2005.49).
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31