DISTRHO Plugin Framework
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
Triangle< typename > 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
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
void draw ()
 
void drawOutline ()
 
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>
class Triangle< typename >

DGL Triangle class.

This class describes a triangle, defined by 3 points.

Constructor & Destructor Documentation

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

Constructor for a null triangle.

template<typename >
Triangle< typename >::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 >
Triangle< typename >::Triangle ( const Point< T > &  pos1,
const Point< T > &  pos2,
const Point< T > &  pos3 
)
noexcept

Constructor using custom position values.

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

Constructor using another Triangle class values.

Member Function Documentation

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

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

template<typename >
bool Triangle< typename >::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 >
bool Triangle< typename >::isValid ( ) const
noexcept

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

template<typename >
bool Triangle< typename >::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.

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

Draw this triangle using the current OpenGL state.

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

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


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