#include <triangleiterator.h>
template<class T>
class nap::TriangleData< T >
Data associated with a single triangle. The data is extracted from a VertexAttribute using the Triangle interface or can be constructed manually.
◆ TriangleData() [1/2]
TriangleData |
( |
const T & |
first, |
|
|
const T & |
second, |
|
|
const T & |
third |
|
) |
| |
◆ TriangleData() [2/2]
◆ first()
- Returns
- The data belonging to the first vertex of the triangle
◆ operator[]() [1/2]
T& operator[] |
( |
std::size_t |
index | ) |
|
Array subscript overload
- Parameters
-
index | the index of the attribute value |
- Returns
- the vertex attribute value at index
◆ operator[]() [2/2]
const T& operator[] |
( |
std::size_t |
index | ) |
const |
Const array subscript overload
- Parameters
-
index | the index of the attribute value |
- Returns
- the vertex attribute value at index
◆ second()
const T& second |
( |
| ) |
const |
- Returns
- The data belonging to the second vertex of the triangle
◆ setFirst()
void setFirst |
( |
const T & |
data | ) |
|
Set the data belonging to the first vertex of the triangle
- Parameters
-
data | data associated with the first vertex |
◆ setSecond()
void setSecond |
( |
const T & |
data | ) |
|
Set the data belonging to the second vertex of the triangle
- Parameters
-
data | data associated with the second vertex |
◆ setThird()
void setThird |
( |
const T & |
data | ) |
const |
Set the data belonging to the third vertex of the triangle
- Parameters
-
data | data associated with the third vertex |
◆ third()
- Returns
- The data belonging to the third vertex of the triangle