12#ifndef EBGEOMETRY_DCEL_EDGE_HPP
13#define EBGEOMETRY_DCEL_EDGE_HPP
49template <
class T,
class Meta>
52 static_assert(std::is_floating_point_v<T>,
"EdgeT<T,Meta>: T must be a floating-point type");
411#include "EBGeometry_DCEL_EdgeImplem.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.
Half-edge class for navigating a DCEL mesh.
Definition EBGeometry_DCEL_Edge.hpp:51
T signedDistance(const Vec3 &a_x0) const noexcept
Get the signed distance from a_x0 to this half-edge.
Vec3T< T > & getNormal() noexcept
Get modifiable normal vector.
EdgePtr getNextEdge() noexcept
Get the next edge.
void setNextEdge(const EdgePtr &a_nextEdge) noexcept
Set the next edge.
VertexPtr getVertex() noexcept
Get the starting vertex.
VertexPtr getOtherVertex() noexcept
Get the end vertex.
void reconcile() noexcept
Reconcile internal logic.
Vec3T< T > getX2X1() const noexcept
Get the vector pointing along this edge (from start to end vertex).
std::weak_ptr< Edge > m_nextEdge
Next edge. See m_vertex for why this is a weak_ptr.
Definition EBGeometry_DCEL_Edge.hpp:373
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer type.
Definition EBGeometry_DCEL_Edge.hpp:78
std::weak_ptr< Face > m_face
Enclosing polygon face. See m_vertex for why this is a weak_ptr.
Definition EBGeometry_DCEL_Edge.hpp:378
void setMetaData(const Meta &a_metaData) noexcept
Set the meta-data.
Meta m_metaData
Meta-data attached to this edge.
Definition EBGeometry_DCEL_Edge.hpp:386
std::weak_ptr< Edge > m_pairEdge
Pair edge. See m_vertex for why this is a weak_ptr.
Definition EBGeometry_DCEL_Edge.hpp:368
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer type.
Definition EBGeometry_DCEL_Edge.hpp:83
Meta & getMetaData() noexcept
Get meta-data.
void setVertex(const VertexPtr &a_vertex) noexcept
Set the starting vertex.
EdgeT() noexcept=default
Default constructor. Sets all pointers to zero and vectors to zero vectors.
std::weak_ptr< Vertex > m_vertex
Starting vertex.
Definition EBGeometry_DCEL_Edge.hpp:363
void define(const VertexPtr &a_vertex, const EdgePtr &a_pairEdge, const EdgePtr &a_nextEdge) noexcept
Define function. Sets the starting vertex, edges, and normal vectors.
void setFace(const FacePtr &a_face) noexcept
Set the pointer to this half-edge's face.
FacePtr getFace() noexcept
Get this half-edge's face.
T unsignedDistance2(const Vec3 &a_x0) const noexcept
Get the squared unsigned distance from a_x0 to this half-edge.
void setPairEdge(const EdgePtr &a_pairEdge) noexcept
Set the pair edge.
std::shared_ptr< Face > FacePtr
Alias for face pointer type.
Definition EBGeometry_DCEL_Edge.hpp:88
size_t size() const noexcept
Get size (in bytes) of this object.
Vec3T< T > computeNormal() const noexcept
Compute the normal vector as the average of the face normals on both sides of this edge.
T projectPointToEdge(const Vec3 &a_x0) const noexcept
Returns the parametric projection of a_x0 onto this edge.
EdgePtr getPairEdge() noexcept
Get the pair edge.
void flipNormal() noexcept
Flip surface normal.
Vec3 m_normal
Normal vector.
Definition EBGeometry_DCEL_Edge.hpp:354
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31