![]() |
ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This class is used to describe the vertices and faces of a mesh. More...
#include <include/reactphysics3d/collision/PolygonVertexArray.h>
Classes | |
| struct | PolygonFace |
| Represent a polygon face of the mesh. More... | |
Public Types | |
| enum class | VertexDataType { VERTEX_FLOAT_TYPE , VERTEX_DOUBLE_TYPE } |
| Data type for the vertices in the array. | |
| enum class | IndexDataType { INDEX_INTEGER_TYPE , INDEX_SHORT_TYPE } |
| Data type for the indices in the array. | |
Public Member Functions | |
| PolygonVertexArray () | |
| Constructor. | |
| PolygonVertexArray (uint32 nbVertices, const void *verticesStart, uint32 verticesStride, const void *indexesStart, uint32 indexesStride, uint32 nbFaces, PolygonFace *facesStart, VertexDataType vertexDataType, IndexDataType indexDataType) | |
| Constructor. | |
| void | init (uint32 nbVertices, const void *verticesStart, uint32 verticesStride, const void *indexesStart, uint32 indexesStride, uint32 nbFaces, PolygonFace *facesStart, VertexDataType vertexDataType, IndexDataType indexDataType) |
| Initialize the PolygonVertexArray. | |
| VertexDataType | getVertexDataType () const |
| Return the vertex data type. | |
| IndexDataType | getIndexDataType () const |
| Return the index data type. | |
| uint32 | getNbVertices () const |
| Return the number of vertices. | |
| uint32 | getNbFaces () const |
| Return the number of faces. | |
| uint32 | getVerticesStride () const |
| Return the vertices stride (number of bytes) | |
| uint32 | getIndicesStride () const |
| Return the indices stride (number of bytes) | |
| uint32 | getVertexIndexInFace (uint32 faceIndex32, uint32 noVertexInFace) const |
| Return the vertex index of a given vertex in a face. | |
| Vector3 | getVertex (uint32 vertexIndex) const |
| Return the coordinates of a given vertex. | |
| PolygonFace * | getPolygonFace (uint32 faceIndex) const |
| Return a polygon face of the mesh. | |
| const unsigned char * | getVerticesStart () const |
| Return the pointer to the start of the vertices array. | |
| const unsigned char * | getIndicesStart () const |
| Return the pointer to the start of the indices array. | |
This class is used to describe the vertices and faces of a mesh.
A PolygonVertexArray represents an array of vertices and polygon faces of a mesh. When you create a PolygonVertexArray, no data is copied into the array. It only stores pointer to the data.
| PolygonVertexArray::PolygonVertexArray | ( | uint32 | nbVertices, |
| const void * | verticesStart, | ||
| uint32 | verticesStride, | ||
| const void * | indexesStart, | ||
| uint32 | indexesStride, | ||
| uint32 | nbFaces, | ||
| PolygonFace * | facesStart, | ||
| VertexDataType | vertexDataType, | ||
| IndexDataType | indexDataType ) |
Constructor.
Note that your data will not be copied into the PolygonVertexArray and therefore, you need to make sure that those data are always valid during the lifetime of the PolygonVertexArray.
| nbVertices | Number of vertices in the array |
| verticesStart | Pointer to the start of the vertices data |
| verticesStride | The number of bytes between two consecutive vertices in the array |
| indexesStart | Pointer to the start of the face indices data |
| indexesStride | The number of bytes between two consecutive face indices in the array |
| nbFaces | The number of faces in the array |
| facesStart | Pointer to the start of the faces data |
| vertexDataType | Data type of the vertices data |
| indexDataType | Data type of the face indices data |
| RP3D_FORCE_INLINE PolygonVertexArray::IndexDataType reactphysics3d::PolygonVertexArray::getIndexDataType | ( | ) | const |
Return the index data type.
| RP3D_FORCE_INLINE const unsigned char * reactphysics3d::PolygonVertexArray::getIndicesStart | ( | ) | const |
Return the pointer to the start of the indices array.
| RP3D_FORCE_INLINE uint32 reactphysics3d::PolygonVertexArray::getIndicesStride | ( | ) | const |
Return the indices stride (number of bytes)
| RP3D_FORCE_INLINE uint32 reactphysics3d::PolygonVertexArray::getNbFaces | ( | ) | const |
Return the number of faces.
| RP3D_FORCE_INLINE uint32 reactphysics3d::PolygonVertexArray::getNbVertices | ( | ) | const |
Return the number of vertices.
| RP3D_FORCE_INLINE PolygonVertexArray::PolygonFace * reactphysics3d::PolygonVertexArray::getPolygonFace | ( | uint32 | faceIndex | ) | const |
Return a polygon face of the mesh.
| faceIndex | Index of a given face |
| RP3D_FORCE_INLINE PolygonVertexArray::VertexDataType reactphysics3d::PolygonVertexArray::getVertexDataType | ( | ) | const |
Return the vertex data type.
| uint32 PolygonVertexArray::getVertexIndexInFace | ( | uint32 | faceIndex32, |
| uint32 | noVertexInFace ) const |
Return the vertex index of a given vertex in a face.
| RP3D_FORCE_INLINE const unsigned char * reactphysics3d::PolygonVertexArray::getVerticesStart | ( | ) | const |
Return the pointer to the start of the vertices array.
| RP3D_FORCE_INLINE uint32 reactphysics3d::PolygonVertexArray::getVerticesStride | ( | ) | const |
Return the vertices stride (number of bytes)