|
| | VertexT ()=default |
| | Default constructor.
|
| |
| | VertexT (const Vec3 &a_position) |
| | Partial constructor.
|
| |
| | VertexT (const Vec3 &a_position, const Vec3 &a_normal) |
| | Constructor.
|
| |
| | VertexT (const Vertex &a_otherVertex)=default |
| | Copy constructor.
|
| |
| | VertexT (Vertex &&a_otherVertex)=default |
| | Move constructor.
|
| |
|
| ~VertexT ()=default |
| | Destructor (does nothing)
|
| |
| Vertex & | operator= (const Vertex &a_otherVertex)=default |
| | Copy assignment operator.
|
| |
| Vertex & | operator= (Vertex &&a_otherVertex)=default |
| | Move assignment operator.
|
| |
| void | define (const Vec3 &a_position, const uint32_t a_edgeIndex, const Vec3 &a_normal) noexcept |
| | Define function.
|
| |
| void | setPosition (const Vec3 &a_position) noexcept |
| | Set the vertex position.
|
| |
| void | setNormal (const Vec3 &a_normal) noexcept |
| | Set the vertex normal vector.
|
| |
| void | setEdge (const uint32_t a_edgeIndex) noexcept |
| | Set the index of the outgoing edge.
|
| |
| void | normalizeNormalVector () noexcept |
| | Normalize the normal vector, ensuring its length is 1.
|
| |
| void | computeVertexNormalAngleWeighted (const uint32_t a_thisVertexIndex, const std::vector< uint32_t > &a_faceIndices, const Mesh &a_mesh) |
| | Compute the vertex normal, using the pseudonormal algorithm which weights the normal with the subtended angle to each connected face.
|
| |
|
void | flipNormal () noexcept |
| | Flip the normal vector.
|
| |
| Vec3T< T > & | getPosition () noexcept |
| | Return modifiable vertex position.
|
| |
| const Vec3T< T > & | getPosition () const noexcept |
| | Return immutable vertex position.
|
| |
| Vec3T< T > & | getNormal () noexcept |
| | Return modifiable vertex normal vector.
|
| |
| const Vec3T< T > & | getNormal () const noexcept |
| | Return immutable vertex normal vector.
|
| |
| uint32_t | getOutgoingEdgeIndex () const noexcept |
| | Get the index of the outgoing edge.
|
| |
| Edge & | getOutgoingEdge (Mesh &a_mesh) noexcept |
| | Get the outgoing edge.
|
| |
| const Edge & | getOutgoingEdge (const Mesh &a_mesh) const noexcept |
| | Get the outgoing edge (const overload).
|
| |
| T | signedDistance (const Vec3 &a_x0) const noexcept |
| | Get the signed distance to this vertex.
|
| |
| T | unsignedDistance2 (const Vec3 &a_x0) const noexcept |
| | Get the squared unsigned distance to this vertex.
|
| |
template<class T>
class EBGeometry::DCEL::VertexT< T >
Vertex class for navigating a DCEL mesh.
Class which represents a vertex node in a doubly-connected edge list (DCEL).
- Template Parameters
-
| T | Floating-point precision type. |
This class is used in DCEL functionality which stores polygonal surfaces in a mesh. The VertexT class has a position, a normal vector, and the index of one of the outgoing edges from the vertex.
- Note
- The normal vector is outgoing, i.e. a point x is "outside" the vertex if the dot product between n and (x - x0) is positive.
-
m_outgoingEdge is an index into the owning DCEL::MeshT's own edge array, resolved by passing that mesh to the accessors below (see EdgeT for why indices rather than pointers are used). It is the sole topology this class stores: which faces touch this vertex is not cached here. Every member is a plain value (Vec3, uint32_t), so VertexT itself is trivially copyable. A vertex's id is its index in the mesh's vertex array. computeVertexNormalAngleWeighted() takes the touching-faces list as an explicit parameter instead: MeshT::reconcileVertices() builds it transiently by walking every face's own boundary loop (no pair edges needed, so this works even on a non-watertight/"dirty" mesh), and discards it once normals are computed. m_outgoingEdge itself is unrelated to this – it is not read by the normal computation – and remains purely a convenience for callers who want O(1) access to some edge leaving this vertex.
-
Every method that resolves purely through plain-value members and an explicitly-supplied Mesh& (getPosition/getNormal/getOutgoingEdgeIndex/ getOutgoingEdge, define, setPosition/setNormal/setEdge, normalizeNormalVector, flipNormal, signedDistance, unsignedDistance2) is annotated EBGEOMETRY_HOST_DEVICE. computeVertexNormalAngleWeighted() takes a std::vector<uint32_t>& and aborts with a message on a malformed face, so it remains EBGEOMETRY_HOST.
- Template Parameters
-
| T | Floating-point precision. |