DISTRHO Plugin Framework
|
#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 (const GraphicsContext &context) |
void | drawOutline (const GraphicsContext &context, T lineWidth=1) |
Triangle< T > & | operator= (const Triangle< T > &tri) noexcept |
bool | operator== (const Triangle< T > &tri) const noexcept |
bool | operator!= (const Triangle< T > &tri) const noexcept |
void | draw () |
void | drawOutline () |
DGL Triangle class.
This class describes a triangle, defined by 3 points.
|
noexcept |
Constructor using custom X and Y values.
|
noexcept |
Constructor using custom position values.
Constructor using another Triangle class values.
|
noexcept |
Return true if triangle is null (all its points are equal). An null triangle is also invalid.
|
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.
|
noexcept |
Return true if triangle is valid (all its points are different).
|
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.
void Triangle< T >::draw | ( | const GraphicsContext & | context | ) |
Draw this triangle using the provided graphics context.
void Triangle< T >::drawOutline | ( | const GraphicsContext & | context, |
T | lineWidth = 1 |
||
) |
Draw lines (outline of this triangle) using the provided graphics context, optionally specifying line width.
void Triangle< T >::draw | ( | ) |
Draw this triangle using the current OpenGL state.
DEPRECATED Please use draw(const GraphicsContext&) instead.
void Triangle< T >::drawOutline | ( | ) |
Draw lines (outline of this triangle) using the current OpenGL state.
DEPRECATED Please use drawOutline(const GraphicsContext&,T) instead.