template class EE::Math::Triangle2

Overview

Utility template class for manipulating triangles. More…

#include <triangle2.hpp>

template <typename T>
class Triangle2 {
public:
    // fields

    Vector2<T> V[3];

    // construction

    Triangle2();
    Triangle2(const Vector2<T>& v1, const Vector2<T>& v2, const Vector2<T>& v3);

    // methods

    tSize<T>& getAt(Uint32 Index);
    tSize<T> getSize();
};

Detailed Documentation

Utility template class for manipulating triangles.

Construction

Triangle2()

Default constructor ( creates 3 empty Vector3(0,0,0)

Triangle2(const Vector2<T>& v1, const Vector2<T>& v2, const Vector2<T>& v3)

Create a triangle from 3 vectors

Methods

tSize<T>& getAt(Uint32 Index)

Returns:

The vector index ( between 0 and 2 )