ReactPhysics3D: reactphysics3d::VertexArray Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
reactphysics3d::VertexArray Class Reference

This class is used to describe an array of vertices. More...

`#include <include/reactphysics3d/collision/VertexArray.h>`

## Public Types
enum class | DataType { VERTEX_FLOAT_TYPE , VERTEX_DOUBLE_TYPE }
| Data type for the vertices in the array.

## Public Member Functions
| VertexArray (const void *start, uint32 stride, uint32 nbVertices, DataType dataType)
| Constructor.
DataType | getDataType () const
| Return the vertex data type.
uint32 | getNbVertices () const
| Return the number of vertices.
uint32 | getStride () const
| Return the vertices stride (number of bytes)
Vector3 | getVertex (uint32 index) const
| Return the coordinates of a given vertex.
const unsigned char * | getStart () const
| Return the pointer to the start of the vertices array.

## Detailed Description

This class is used to describe an array of vertices.

## Constructor & Destructor Documentation

## ◆ VertexArray()

VertexArray::VertexArray | ( | const void * | start,
|  | uint32 | stride,
|  | uint32 | nbVertices,
|  | DataType | dataType )

Constructor.

Note that your data will not be copied into the PolygonVertexArray.

Parameters

  start | Pointer to the start of the vertices data
  stride | The number of bytes between two consecutive vertices in the array
  nbVertices | Number of vertices in the array
  dataType | Data type of the vertices data

## Member Function Documentation

## ◆ getDataType()

RP3D_FORCE_INLINE VertexArray::DataType reactphysics3d::VertexArray::getDataType | ( |  | ) | const

Return the vertex data type.

Returns
  The data type of the vertices in the array

## ◆ getNbVertices()

RP3D_FORCE_INLINE uint32 reactphysics3d::VertexArray::getNbVertices | ( |  | ) | const

Return the number of vertices.

Returns
  The number of vertices in the array

## ◆ getStart()

RP3D_FORCE_INLINE const unsigned char * reactphysics3d::VertexArray::getStart | ( |  | ) | const

Return the pointer to the start of the vertices array.

Returns
  A pointer to the start of the vertex array of the mesh

## ◆ getStride()

RP3D_FORCE_INLINE uint32 reactphysics3d::VertexArray::getStride | ( |  | ) | const

Return the vertices stride (number of bytes)

Returns
  The number of bytes between two vertices

The documentation for this class was generated from the following files:

- include/reactphysics3d/collision/VertexArray.h
- src/collision/VertexArray.cpp