Triangle class consisting of 3 vertices. More...
Public Member Functions | |
Triangle (const VertexType &v0, const VertexType &v1, const VertexType &v2) | |
Triangle constructor. | |
const VertexType & | operator[] (unsigned int cornerIndex) const |
Accesses a corner of the triangle. |
Triangle class consisting of 3 vertices.
The invariant of this class is that the corners 0, 1, 2 are aligned in clockwise order.
VertexType | The type of the vertices. Should be thor::Vertex or derived from thor::Vertex. |
thor::Triangle< VertexType >::Triangle | ( | const VertexType & | v0, |
const VertexType & | v1, | ||
const VertexType & | v2 | ||
) |
Triangle constructor.
The vertices v0, v1 and v2 form the corners of the triangle. They are only referenced and not copied. v0, v1 and v2 shall always be clockwise-oriented.
const VertexType& thor::Triangle< VertexType >::operator[] | ( | unsigned int | cornerIndex | ) | const |
Accesses a corner of the triangle.
cornerIndex | The index of the corner. Must be 0, 1 or 2. |