|  | ReactPhysics3D
    v0.10.2
    C++ Physics engine library | 
This class describes a polyhedron mesh made of faces and vertices. More...
#include <include/reactphysics3d/utils/quickhull/QHHalfEdgeStructure.h>
| Classes | |
| struct | Edge | 
| An half-edge.  More... | |
| struct | Face | 
| A face.  More... | |
| struct | Vertex | 
| A vertex.  More... | |
| Public Types | |
| using | VerticesPair = Pair<uint32, uint32> | 
| using | EdgeVertices = Pair<const Vertex*, const Vertex*> | 
| Public Member Functions | |
| QHHalfEdgeStructure (MemoryAllocator &allocator) | |
| Constructor. | |
| ~QHHalfEdgeStructure () | |
| Destructor. | |
| Vertex * | addVertex (uint32 externalIndex) | 
| Add a vertex. | |
| Face * | addFace (const Array< Vertex * > &faceVertices, const Array< Vector3 > &points, MemoryAllocator &allocator) | 
| Add a face. | |
| void | removeFace (Face *face) | 
| Remove a face. | |
| void | deleteFace (Face *face) | 
| Delete the face. | |
| void | removeHalfEdge (Edge *edge) | 
| Remove an half-edge. | |
| void | removeVertex (Vertex *vertex) | 
| Remove a vertex. | |
| uint32 | getNbFaces () const | 
| Return the number of faces. | |
| uint32 | getNbHalfEdges () const | 
| Return the number of half-edges. | |
| uint32 | getNbVertices () const | 
| Return the number of vertices. | |
| const Face * | getFaces () const | 
| Return a pointer to the first face in the linked-list of faces. | |
| const Edge * | getHalfEdges () const | 
| Return a pointer to the first half-edge in the linked-list of half-edges. | |
| const Vertex * | getVertices () const | 
| Return a pointer to the first vertex in the linked-list of vertices. | |
| bool | isValid () const | 
| Return true if the half-edge structure is valid (for debugging purpose) | |
| std::string | to_string () const | 
| Return a string representation of the half-edge structure. | |
This class describes a polyhedron mesh made of faces and vertices.
The faces do not have to be triangles. Note that in the linked-list of half-edges an edge must always follow its twin edge. This way, on closed mesh, we can always iterate every two half-edges to find the unique edges. This class is only used for QuickHull algorithm.
| QHHalfEdgeStructure::Face * QHHalfEdgeStructure::addFace | ( | const Array< Vertex * > & | faceVertices, | 
| const Array< Vector3 > & | points, | ||
| MemoryAllocator & | allocator ) | 
Add a face.
| faceVertices | Array of the vertices in a face (ordered in CCW order as seen from outside the polyhedron). The indices are the internal indices of the vertices inside the HalfEdgeStructure. | 
| points | Array with the points (coordinates) of the face vertices | 
| allocator | Reference to a memory allocator | 
| QHHalfEdgeStructure::Vertex * QHHalfEdgeStructure::addVertex | ( | uint32 | externalIndex | ) | 
Add a vertex.
| externalIndex | Index of the vertex in the external user vertex data array | 
| RP3D_FORCE_INLINE uint32 reactphysics3d::QHHalfEdgeStructure::getNbFaces | ( | ) | const | 
Return the number of faces.
| RP3D_FORCE_INLINE uint32 reactphysics3d::QHHalfEdgeStructure::getNbHalfEdges | ( | ) | const | 
Return the number of half-edges.
| RP3D_FORCE_INLINE uint32 reactphysics3d::QHHalfEdgeStructure::getNbVertices | ( | ) | const | 
Return the number of vertices.