Ocean
|
Definition of a triangle face with three vertex indices. More...
Public Member Functions | |
TriangleFace () | |
Creates a new triangle face object with undefined indices. More... | |
TriangleFace (const VertexIndex startIndex) | |
Creates a new triangle face object with successive indices. More... | |
TriangleFace (const VertexIndex first, const VertexIndex second, const VertexIndex third) | |
Creates a new triangle face object with three given indices. More... | |
TriangleFace (const VertexIndex *arrayValue) | |
Creates a new triangle face object by an array of at least three indices. More... | |
VertexIndex | index (const unsigned int index) const |
Returns a specific vertex index specified by it's index inside the face. More... | |
VertexIndex & | index (const unsigned int index) |
Returns a specific vertex index specified by it's index inside the face. More... | |
VertexIndex | operator[] (const unsigned int index) const |
Returns a specific vertex index specified by it's index inside the face. More... | |
VertexIndex & | operator[] (const unsigned int index) |
Returns a specific vertex index specified by it's index inside the face. More... | |
const VertexIndex * | operator() () const |
Returns the pointer to the first element of the vertex indices. More... | |
VertexIndex * | operator() () |
Returns the pointer to the first element of the vertex indices. More... | |
bool | operator== (const TriangleFace &triangleFace) const |
Returns whether two triangle face objects are identical. More... | |
bool | operator!= (const TriangleFace &triangleFace) const |
Returns whether two triangle face objects are not identical. More... | |
size_t | operator() (const Rendering::TriangleFace &triangleFace) const |
Hash function for a TriangleFace object. More... | |
Static Public Member Functions | |
static Vectors3 | calculatePerFaceNormals (const TriangleFaces &faces, const Vertices &vertices, const bool counterClockWise=true) |
Calculates per-face normals for a given set of triangles. More... | |
static Vectors3 | calculateSmoothedPerVertexNormals (const TriangleFaces &faces, const Vertices &vertices, const Vectors3 &perFaceNormals) |
Calculates smoothed per-vertex normals for a given set of triangles and per-face normals. More... | |
static bool | calculateSmoothedPerVertexNormals (const TriangleFaces &faces, const Vectors3 &vertices, Vectors3 &normals, const Scalar creaseAngle) |
Recalculates smoothed per-vertex normals for a given set of triangles with per vertex normals. More... | |
static Vectors3 | calculateSmoothedPerVertexNormals (const TriangleFaces &faces, const Vectors3 &vertices) |
Calculates smoothed per-vertexnormals for a given set of triangles. More... | |
static TriangleFaces | indices2triangleFaces (const Index32 *indices, const size_t size) |
Convertes indices of triangles to triangle faces. More... | |
Protected Types | |
typedef std::map< Vertex, VertexIndices > | VertexMap |
Definition of a map mapping vertices to their corresponding face indices. More... | |
Protected Attributes | |
VertexIndex | indices_ [3] |
The three vertex indices. More... | |
Definition of a triangle face with three vertex indices.
|
protected |
Definition of a map mapping vertices to their corresponding face indices.
|
inline |
Creates a new triangle face object with undefined indices.
|
inlineexplicit |
Creates a new triangle face object with successive indices.
The first index is given, the following indices will be set to successive values.
startIndex | Index of the first vertex |
|
inline |
Creates a new triangle face object with three given indices.
first | First vertex index |
second | Second vertex index |
third | Third vertex index |
|
inlineexplicit |
Creates a new triangle face object by an array of at least three indices.
arrayValue | Array with at least three vertex indices |
|
static |
Calculates per-face normals for a given set of triangles.
faces | The triangle faces |
vertices | The triangle vertices corresponding to the faces |
counterClockWise | True, if the faces are provides so that a front face is determined in a counter clockwise order The resulting per-face normals, one for each faces |
|
static |
Calculates smoothed per-vertexnormals for a given set of triangles.
faces | The triangle faces |
vertices | The triangle vertices corresponding to the faces |
|
static |
Recalculates smoothed per-vertex normals for a given set of triangles with per vertex normals.
faces | The triangle faces |
vertices | The triangle vertices corresponding to the faces |
normals | The per-vertex normals, which are not smoothed yet |
creaseAngle | Crease angle defining the seperation between per face and per vertex normals in radian, with range [0, PI/2] |
|
static |
Calculates smoothed per-vertex normals for a given set of triangles and per-face normals.
faces | The triangle faces |
vertices | The triangle vertices corresponding to the faces |
perFaceNormals | The per-face normals The resulting per-vertex normals, one for each vertex |
|
inline |
Returns a specific vertex index specified by it's index inside the face.
Beware: No range check will be done!
index | Index of the vertex index with range [0, 2] |
|
inline |
Returns a specific vertex index specified by it's index inside the face.
Beware: No range check will be done!
index | Index of the vertex index with range [0, 2] |
|
inlinestatic |
Convertes indices of triangles to triangle faces.
indices | The indices of the triangle, must be valid |
size | The number of indices, with range [3, infinity), must be a multiple of 3 |
|
inline |
Returns whether two triangle face objects are not identical.
triangleFace | The second object to compare |
|
inline |
Returns the pointer to the first element of the vertex indices.
|
inline |
Returns the pointer to the first element of the vertex indices.
|
inline |
Hash function for a TriangleFace object.
triangleFace | The triangle face for which the hash will be determined |
|
inline |
Returns whether two triangle face objects are identical.
triangleFace | The second object to compare |
|
inline |
Returns a specific vertex index specified by it's index inside the face.
Beware: No range check will be done!
index | Index of the vertex index with range [0, 2] |
|
inline |
Returns a specific vertex index specified by it's index inside the face.
Beware: No range check will be done!
index | Index of the vertex index with range [0, 2] |
|
protected |
The three vertex indices.