#include <triangleiterator.h>
Contains the indices of a triangle associated with a specific nap::MeshShape inside a nap::MeshInstance
◆ IndexArray
◆ ShapeTriangle()
| ShapeTriangle |
( |
int |
triangleIndex, |
|
|
int |
index0, |
|
|
int |
index1, |
|
|
int |
index2 |
|
) |
| |
◆ begin()
| IndexArray::const_iterator begin |
( |
| ) |
|
◆ end()
| IndexArray::const_iterator end |
( |
| ) |
|
◆ firstIndex()
- Returns
- The index of the first vertex of this triangle
◆ getTriangleIndex()
| int getTriangleIndex |
( |
| ) |
const |
- Returns
- The index of the triangle in the shape
◆ getVertexData()
Returns the triangle vertex data of a specific attribute, for example the triangle position, color or normal.
- Parameters
-
| attribute | The vertex attribute to retrieve vertex data for. |
- Returns
- the vertex data data of the given attribute, corresponding to the indices in this triangle.
◆ indices()
- Returns
- The indices of this triangle
◆ operator[]()
| int operator[] |
( |
std::size_t |
index | ) |
const |
- Returns
- The index of the vertex at the specified index
◆ secondIndex()
| int secondIndex |
( |
| ) |
const |
- Returns
- The index of the second vertex of this triangle
◆ setVertexData() [1/3]
| void setVertexData |
( |
VertexAttribute< T > & |
attribute, |
|
|
const T & |
firstValue, |
|
|
const T & |
secondValue, |
|
|
const T & |
thirdValue |
|
) |
| |
Sets the triangle vertex data of a specific attribute, for example the triangle position, color or normal.
- Parameters
-
| attribute | The VertexAttribute to set data to |
| firstValue | The value to set to the first vertex of the triangle |
| secondValue | The value to set to the second vertex of the triangle |
| thirdValue | The value to set to the third vertex of the triangle |
◆ setVertexData() [2/3]
- Parameters
-
| attribute | The VertexAttribute to set data to |
| value | The value to set to all vertices of the triangle |
◆ setVertexData() [3/3]
◆ thirdIndex()
- Returns
- The index of the third vertex of this triangle