13#ifndef EBGeometry_DCEL_Edge
14#define EBGeometry_DCEL_Edge
45 template <
class T,
class Meta>
326#include "EBGeometry_NamespaceFooter.hpp"
328#include "EBGeometry_DCEL_EdgeImplem.hpp"
Declaration of a polygon face class for use in DCEL descriptions of polygon tesselations.
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Edge class.
Definition EBGeometry_DCEL_Edge.hpp:47
EdgePtr m_nextEdge
Next edge.
Definition EBGeometry_DCEL_Edge.hpp:297
T projectPointToEdge(const Vec3 &a_x0) const noexcept
Returns the "projection" of a point to an edge.
EdgeT(const VertexPtr &a_vertex)
Partial constructor. Calls the default constructor but sets the starting vertex.
VertexPtr & getOtherVertex() noexcept
Get modifiable end vertex.
VertexPtr m_vertex
Starting vertex.
Definition EBGeometry_DCEL_Edge.hpp:287
EdgeT(const Edge &a_otherEdge)
Copy constructor. Copies all information from the other half-edge.
void reconcile() noexcept
Reconcile internal logic.
FacePtr & getFace() noexcept
Get modifiable half-edge face.
Vec3T< T > computeNormal() const noexcept
Compute the normal vector.
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer type.
Definition EBGeometry_DCEL_Edge.hpp:77
void setNextEdge(const EdgePtr &a_nextEdge) noexcept
Set the next edge.
Vec3T< T > getX2X1() const noexcept
Get the vector pointing along this edge.
std::shared_ptr< Face > FacePtr
Alias for face pointer type.
Definition EBGeometry_DCEL_Edge.hpp:82
EdgePtr & getPairEdge() noexcept
Get modifiable pair edge.
const Vec3T< T > & getNormal() const noexcept
Get the normal vector.
void setFace(const FacePtr &a_face) noexcept
Set the pointer to this half-edge's face.
EdgeT()
Default constructor. Sets all pointers to zero and vectors to zero vectors.
Meta m_metaData
Meta-data attached to this edge.
Definition EBGeometry_DCEL_Edge.hpp:307
EdgePtr & getNextEdge() noexcept
Get modifiable next edge.
Meta & getMetaData() noexcept
Get meta-data.
void setPairEdge(const EdgePtr &a_pairEdge) noexcept
Set the pair edge.
Vec3 m_normal
Normal vector.
Definition EBGeometry_DCEL_Edge.hpp:282
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.
T signedDistance(const Vec3 &a_x0) const noexcept
Get the signed distance to this half edge.
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer type.
Definition EBGeometry_DCEL_Edge.hpp:72
T unsignedDistance2(const Vec3 &a_x0) const noexcept
Get the signed distance to this half edge.
FacePtr m_face
Enclosing polygon face.
Definition EBGeometry_DCEL_Edge.hpp:302
void setVertex(const VertexPtr &a_vertex) noexcept
Set the starting vertex.
virtual ~EdgeT()
Destructor (does nothing)
size_t size() const noexcept
Get size (in bytes) of this object.
VertexPtr & getVertex() noexcept
Get modifiable starting vertex.
void flip() noexcept
Flip surface normal.
EdgePtr m_pairEdge
Pair edge.
Definition EBGeometry_DCEL_Edge.hpp:292
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218
Namespace containing various double-connected edge list (DCEL) functionality.