|  | ReactPhysics3D
    v0.10.2
    C++ Physics engine library | 
This class describes a polyhedron mesh made of faces and vertices. More...
#include <include/reactphysics3d/collision/HalfEdgeStructure.h>
| Classes | |
| struct | Edge | 
| Edge.  More... | |
| struct | Face | 
| Face.  More... | |
| struct | Vertex | 
| Vertex.  More... | |
| Public Types | |
| using | VerticesPair = Pair<uint32, uint32> | 
| Public Member Functions | |
| HalfEdgeStructure (MemoryAllocator &allocator, uint32 facesCapacity, uint32 verticesCapacity, uint32 edgesCapacity) | |
| Constructor. | |
| ~HalfEdgeStructure ()=default | |
| Destructor. | |
| void | computeHalfEdges () | 
| Compute the half-edges (when all vertices and faces have been added) | |
| uint32 | addVertex (uint32 vertexPointIndex) | 
| Add a vertex. | |
| void | addFace (const Array< uint32 > &faceVertices) | 
| Add a face. | |
| 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 & | getFace (uint32 index) const | 
| Return a given face. | |
| const Edge & | getHalfEdge (uint32 index) const | 
| Return a given edge. | |
| const Vertex & | getVertex (uint32 index) const | 
| Return a given vertex. | |
| void | reserve (uint32 facesCapacity, uint32 verticesCapacity, uint32 edgesCapacity) | 
| Reserve some memory for vertices, faces and edges. | |
| 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 triangle.
| RP3D_FORCE_INLINE void reactphysics3d::HalfEdgeStructure::addFace | ( | const Array< uint32 > & | faceVertices | ) | 
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. | 
| RP3D_FORCE_INLINE uint32 reactphysics3d::HalfEdgeStructure::addVertex | ( | uint32 | vertexPointIndex | ) | 
Add a vertex.
| vertexPointIndex | Index of the vertex in the external user vertex data array | 
| RP3D_FORCE_INLINE const HalfEdgeStructure::Face & reactphysics3d::HalfEdgeStructure::getFace | ( | uint32 | index | ) | const | 
Return a given face.
| RP3D_FORCE_INLINE const HalfEdgeStructure::Edge & reactphysics3d::HalfEdgeStructure::getHalfEdge | ( | uint32 | index | ) | const | 
Return a given edge.
| RP3D_FORCE_INLINE uint32 reactphysics3d::HalfEdgeStructure::getNbFaces | ( | ) | const | 
Return the number of faces.
| RP3D_FORCE_INLINE uint32 reactphysics3d::HalfEdgeStructure::getNbHalfEdges | ( | ) | const | 
Return the number of half-edges.
| RP3D_FORCE_INLINE uint32 reactphysics3d::HalfEdgeStructure::getNbVertices | ( | ) | const | 
Return the number of vertices.
| RP3D_FORCE_INLINE const HalfEdgeStructure::Vertex & reactphysics3d::HalfEdgeStructure::getVertex | ( | uint32 | index | ) | const | 
Return a given vertex.