Bromeon
Public Member Functions
thor::Triangle< VertexType > Class Template Reference

Triangle class consisting of 3 vertices. More...

List of all members.

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.

Detailed Description

template<class VertexType>
class thor::Triangle< VertexType >

Triangle class consisting of 3 vertices.

The invariant of this class is that the corners 0, 1, 2 are aligned in clockwise order.

Template Parameters:
VertexTypeThe type of the vertices. Should be thor::Vertex or derived from thor::Vertex.

Constructor & Destructor Documentation

template<class VertexType >
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.


Member Function Documentation

template<class VertexType >
const VertexType& thor::Triangle< VertexType >::operator[] ( unsigned int  cornerIndex) const

Accesses a corner of the triangle.

Parameters:
cornerIndexThe index of the corner. Must be 0, 1 or 2.
Returns:
Const-reference to the vertex at the specified corner.

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