EBGeometry
1.0
|
Edge class. More...
#include <EBGeometry_DCEL_Edge.hpp>
Public Types | |
using | Vec3 = Vec3T< T > |
Alias for vector type. | |
using | Vertex = VertexT< T, Meta > |
Alias for vertex type. | |
using | Edge = EdgeT< T, Meta > |
Alias for edge type. | |
using | Face = FaceT< T, Meta > |
Alias for face type. | |
using | VertexPtr = std::shared_ptr< Vertex > |
Alias for vertex pointer type. | |
using | EdgePtr = std::shared_ptr< Edge > |
Alias for edge pointer type. | |
using | FacePtr = std::shared_ptr< Face > |
Alias for face pointer type. | |
Public Member Functions | |
EdgeT () | |
Default constructor. Sets all pointers to zero and vectors to zero vectors. | |
EdgeT (const Edge &a_otherEdge) | |
Copy constructor. Copies all information from the other half-edge. More... | |
EdgeT (const VertexPtr &a_vertex) | |
Partial constructor. Calls the default constructor but sets the starting vertex. More... | |
virtual | ~EdgeT () |
Destructor (does nothing) | |
size_t | size () const noexcept |
Get size (in bytes) of this object. | |
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. More... | |
void | reconcile () noexcept |
Reconcile internal logic. More... | |
void | flip () noexcept |
Flip surface normal. | |
void | setVertex (const VertexPtr &a_vertex) noexcept |
Set the starting vertex. More... | |
void | setPairEdge (const EdgePtr &a_pairEdge) noexcept |
Set the pair edge. More... | |
void | setNextEdge (const EdgePtr &a_nextEdge) noexcept |
Set the next edge. More... | |
void | setFace (const FacePtr &a_face) noexcept |
Set the pointer to this half-edge's face. | |
VertexPtr & | getVertex () noexcept |
Get modifiable starting vertex. More... | |
const VertexPtr & | getVertex () const noexcept |
Get immutable starting vertex. More... | |
VertexPtr & | getOtherVertex () noexcept |
Get modifiable end vertex. More... | |
const VertexPtr & | getOtherVertex () const noexcept |
Get immutable end vertex. More... | |
EdgePtr & | getPairEdge () noexcept |
Get modifiable pair edge. More... | |
const EdgePtr & | getPairEdge () const noexcept |
Get immutable pair edge. More... | |
EdgePtr & | getNextEdge () noexcept |
Get modifiable next edge. More... | |
const EdgePtr & | getNextEdge () const noexcept |
Get immutable next edge. More... | |
Vec3T< T > | computeNormal () const noexcept |
Compute the normal vector. | |
const Vec3T< T > & | getNormal () const noexcept |
Get the normal vector. | |
FacePtr & | getFace () noexcept |
Get modifiable half-edge face. | |
const FacePtr & | getFace () const noexcept |
Get immutable half-edge face. | |
Meta & | getMetaData () noexcept |
Get meta-data. More... | |
const Meta & | getMetaData () const noexcept |
Get meta-data. More... | |
T | signedDistance (const Vec3 &a_x0) const noexcept |
Get the signed distance to this half edge. More... | |
T | unsignedDistance2 (const Vec3 &a_x0) const noexcept |
Get the signed distance to this half edge. More... | |
Protected Member Functions | |
T | projectPointToEdge (const Vec3 &a_x0) const noexcept |
Returns the "projection" of a point to an edge. More... | |
Vec3T< T > | getX2X1 () const noexcept |
Get the vector pointing along this edge. | |
Protected Attributes | |
Vec3 | m_normal |
Normal vector. | |
VertexPtr | m_vertex |
Starting vertex. | |
EdgePtr | m_pairEdge |
Pair edge. | |
EdgePtr | m_nextEdge |
Next edge. | |
FacePtr | m_face |
Enclosing polygon face. | |
Meta | m_metaData |
Meta-data attached to this edge. | |
Edge class.
Class which represents a half-edge in a double-edge connected list (DCEL).
This class is used in DCEL functionality which stores polygonal surfaces in a mesh. The information contain in an EdgeT object contains the necessary object for logically circulating the inside of a polygon face. This means that a polygon face has a double-connected list of half-edges which circulate the interior of the face. The EdgeT object is such a half-edge; it represents the outgoing half-edge from a vertex, located such that it can be logically represented as a half edge on the "inside" of a polygon face. It contains pointers to the polygon face, vertex, and next half edge It also contains a pointer to the "pair" half edge, i.e. the corresponding half-edge on the other face that shares this edge. Since this class is used with DCEL functionality and signed distance fields, this class also has a signed distance function and thus a "normal vector".
DCEL::EdgeT< T, Meta >::EdgeT | ( | const Edge & | a_otherEdge | ) |
Copy constructor. Copies all information from the other half-edge.
[in] | a_otherEdge | Other edge |
DCEL::EdgeT< T, Meta >::EdgeT | ( | const VertexPtr & | a_vertex | ) |
Partial constructor. Calls the default constructor but sets the starting vertex.
[in] | a_vertex | Starting vertex. |
|
inlinenoexcept |
Define function. Sets the starting vertex, edges, and normal vectors.
[in] | a_vertex | Starting vertex |
[in] | a_pairEdge | Pair half-edge |
[in] | a_nextEdge | Next half-edge |
|
inlinenoexcept |
Get meta-data.
|
inlinenoexcept |
Get meta-data.
|
inlinenoexcept |
Get immutable next edge.
|
inlinenoexcept |
Get modifiable next edge.
|
inlinenoexcept |
Get immutable end vertex.
|
inlinenoexcept |
Get modifiable end vertex.
|
inlinenoexcept |
Get immutable pair edge.
|
inlinenoexcept |
Get modifiable pair edge.
|
inlinenoexcept |
Get immutable starting vertex.
|
inlinenoexcept |
Get modifiable starting vertex.
|
inlineprotectednoexcept |
Returns the "projection" of a point to an edge.
This function parametrizes the edge as x(t) = x0 + (x1-x0)*t and returns where on the this edge the point a_x0 projects. If projects onto the edge if t = [0,1] and to one of the start/end vertices otherwise.
|
inlinenoexcept |
Reconcile internal logic.
Computes normal.
|
inlinenoexcept |
Set the next edge.
[in] | a_nextEdge | Next edge |
|
inlinenoexcept |
Set the pair edge.
[in] | a_pairEdge | Pair edge |
|
inlinenoexcept |
Set the starting vertex.
[in] | a_vertex | Starting vertex |
|
inlinenoexcept |
Get the signed distance to this half edge.
This routine will check if the input point projects to the edge or one of the vertices. If it projectes to one of the vertices we compute the signed distance to the corresponding vertex. Otherwise we compute the projection to the edge and compute the sign from the normal vector.
|
inlinenoexcept |
Get the signed distance to this half edge.
This routine will check if the input point projects to the edge or one of the vertices. If it projectes to one of the vertices we compute the squared distance to the corresponding vertex. Otherwise we compute the squared distance of the projection to the edge. This is faster than signedDistance()