DISTRHO Plugin Framework
 All Classes Functions Variables Modules Pages
Public Member Functions | List of all members
Triangle< T > Class Template Reference

#include <Geometry.hpp>

Public Member Functions

 Triangle () noexcept
 
 Triangle (const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3) noexcept
 
 Triangle (const Point< T > &pos1, const Point< T > &pos2, const Point< T > &pos3) noexcept
 
 Triangle (const Triangle< T > &tri) noexcept
 
void draw ()
 
void drawOutline ()
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
Triangle< T > & operator= (const Triangle< T > &tri) noexcept
 
bool operator== (const Triangle< T > &tri) const noexcept
 
bool operator!= (const Triangle< T > &tri) const noexcept
 

Detailed Description

template<typename T>
class Triangle< T >

DGL Triangle class.

This class describes a triangle, defined by 3 points.

Constructor & Destructor Documentation

template<typename T >
Triangle< T >::Triangle ( )
noexcept

Constructor for a null triangle.

template<typename T >
Triangle< T >::Triangle ( const T &  x1,
const T &  y1,
const T &  x2,
const T &  y2,
const T &  x3,
const T &  y3 
)
noexcept

Constructor using custom X and Y values.

template<typename T >
Triangle< T >::Triangle ( const Point< T > &  pos1,
const Point< T > &  pos2,
const Point< T > &  pos3 
)
noexcept

Constructor using custom position values.

template<typename T >
Triangle< T >::Triangle ( const Triangle< T > &  tri)
noexcept

Constructor using another Triangle class values.

Member Function Documentation

template<typename T >
void Triangle< T >::draw ( )

Draw this triangle using the current OpenGL state.

template<typename T >
void Triangle< T >::drawOutline ( )

Draw lines (outline of this triangle) using the current OpenGL state.

template<typename T >
bool Triangle< T >::isNull ( ) const
noexcept

Return true if triangle is null (all its points are equal). An null triangle is also invalid.

template<typename T >
bool Triangle< T >::isNotNull ( ) const
noexcept

Return true if triangle is not null (one its points is different from the others). A non-null triangle is still invalid if two of its points are equal.

template<typename T >
bool Triangle< T >::isValid ( ) const
noexcept

Return true if triangle is valid (all its points are different).

template<typename T >
bool Triangle< T >::isInvalid ( ) const
noexcept

Return true if triangle is invalid (one or two of its points are equal). An invalid triangle might not be null under some circumstances.


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