12#ifndef EBGEOMETRY_DCEL_VERTEX_HPP
13#define EBGEOMETRY_DCEL_VERTEX_HPP
41template <
class T,
class Meta>
44 static_assert(std::is_floating_point_v<T>,
"VertexT<T,Meta>: T must be a floating-point type");
394#include "EBGeometry_DCEL_VertexImplem.hpp"
Declaration of a polygon face class for use in DCEL descriptions of polygon tessellations.
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Vertex class for navigating a DCEL mesh.
Definition EBGeometry_DCEL_Vertex.hpp:43
std::shared_ptr< Face > FacePtr
Alias for face pointer type.
Definition EBGeometry_DCEL_Vertex.hpp:80
VertexT(Vertex &&a_otherVertex)=default
Move constructor.
void normalizeNormalVector() noexcept
Normalize the normal vector, ensuring its length is 1.
T signedDistance(const Vec3 &a_x0) const noexcept
Get the signed distance to this vertex.
void setNormal(const Vec3 &a_normal) noexcept
Set the vertex normal vector.
VertexT(const Vec3 &a_position)
Partial constructor.
std::vector< FacePtr > & getFaces() noexcept
Get modifiable polygon face list for this vertex.
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer type.
Definition EBGeometry_DCEL_Vertex.hpp:75
void computeVertexNormalAverage() noexcept
Compute the vertex normal, using an average the normal vector in this vertex's face list (m_faces)
Vertex & operator=(Vertex &&a_otherVertex)=default
Move assignment operator.
void setMetaData(const Meta &a_metaData) noexcept
Set the meta-data.
Vertex & operator=(const Vertex &a_otherVertex)
Copy assignment operator.
Meta & getMetaData() noexcept
Get meta-data.
EdgePtr getOutgoingEdge() noexcept
Get the outgoing edge.
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer type.
Definition EBGeometry_DCEL_Vertex.hpp:70
std::weak_ptr< Edge > m_outgoingEdge
Pointer to an outgoing edge from this vertex.
Definition EBGeometry_DCEL_Vertex.hpp:363
VertexT(const Vertex &a_otherVertex)
Copy constructor.
Vec3 m_position
Vertex position.
Definition EBGeometry_DCEL_Vertex.hpp:368
void addFace(const FacePtr &a_face)
Add a face to the polygon face list.
VertexT(const Vec3 &a_position, const Vec3 &a_normal)
Constructor.
Vec3T< T > & getNormal() noexcept
Return modifiable vertex normal vector.
std::vector< FacePtr > m_faces
List of faces connected to this vertex.
Definition EBGeometry_DCEL_Vertex.hpp:380
void computeVertexNormalAngleWeighted()
Compute the vertex normal, using the pseudonormal algorithm which weights the normal with the subtend...
Vec3T< T > & getPosition() noexcept
Return modifiable vertex position.
void flipNormal() noexcept
Flip the normal vector.
void define(const Vec3 &a_position, const EdgePtr &a_edge, const Vec3 &a_normal) noexcept
Define function.
void setPosition(const Vec3 &a_position) noexcept
Set the vertex position.
T unsignedDistance2(const Vec3 &a_x0) const noexcept
Get the squared unsigned distance to this vertex.
void setEdge(const EdgePtr &a_edge) noexcept
Set the reference to the outgoing edge.
Meta m_metaData
Meta-data for this vertex.
Definition EBGeometry_DCEL_Vertex.hpp:388
VertexT()=default
Default constructor.
Vec3 m_normal
Vertex normal vector.
Definition EBGeometry_DCEL_Vertex.hpp:373
~VertexT()=default
Destructor (does nothing)
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31