![]() |
SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
A rectangle template class. More...
#include <SLRect.h>
Public Member Functions | |
SLRect () | |
SLRect (const T WIDTH, const T HEIGHT) | |
SLRect (const T X, const T Y, const T WIDTH, const T HEIGHT) | |
SLRect (const V &tl, const V &br) | |
void | set (const T X, const T Y, const T WIDTH, const T HEIGHT) |
void | set (const T v[2]) |
void | set (const V tl, const V br) |
void | setZero () |
SLbool | operator== (const SLRect &r) const |
SLbool | operator!= (const SLRect &r) const |
SLRect & | operator= (const SLRect &r) |
void | tl (V v) |
top-left corner More... | |
void | br (V v) |
bottom-right corner More... | |
void | setScnd (V v) |
V | tl () |
top-left corner More... | |
V | br () |
bottom-right corner More... | |
T | area () |
SLbool | isEmpty () const |
SLbool | isZero () |
SLbool | contains (T X, T Y) |
SLbool | contains (V v) |
SLbool | contains (const SLRect &r) |
void | print (const char *str=nullptr) |
void | drawGL (const SLCol4f &color) |
Public Attributes | |
T | x |
T | y |
T | width |
T | height |
Private Attributes | |
SLGLVertexArrayExt | _vao |
Friends | |
std::ostream & | operator<< (std::ostream &output, const SLRect &r) |
A rectangle template class.
Defines a rectangle with a top-left corner at x,y measured from top-left of the window and with its width and height. It is used e.g. to draw a selection rectangle in SLSceneView::draw2DGL.
|
inline |
|
inline |
Definition at line 88 of file SLRect.h.
|
inline |
|
friend |
|
private |