Nebula
|
#include <rectangle.h>
A 2d rectangle class.
Public Member Functions | |
rectangle () | |
default constructor | |
rectangle (TYPE l, TYPE t, TYPE r, TYPE b) | |
constructor 1 | |
void | set (TYPE l, TYPE t, TYPE r, TYPE b) |
set content | |
bool | inside (TYPE x, TYPE y) const |
return true if point is inside | |
TYPE | width () const |
return width | |
TYPE | height () const |
return height | |
TYPE | centerX () const |
return center x | |
TYPE | centerY () const |
return center y | |
Public Attributes | |
TYPE | left |
TYPE | top |
TYPE | right |
TYPE | bottom |
Math::rectangle< TYPE >::rectangle | ( | ) |
default constructor
Math::rectangle< TYPE >::rectangle | ( | TYPE | l, |
TYPE | t, | ||
TYPE | r, | ||
TYPE | b ) |
constructor 1
TYPE Math::rectangle< TYPE >::centerX | ( | ) | const |
return center x
TYPE Math::rectangle< TYPE >::centerY | ( | ) | const |
return center y
TYPE Math::rectangle< TYPE >::height | ( | ) | const |
return height
bool Math::rectangle< TYPE >::inside | ( | TYPE | x, |
TYPE | y ) const |
return true if point is inside
void Math::rectangle< TYPE >::set | ( | TYPE | l, |
TYPE | t, | ||
TYPE | r, | ||
TYPE | b ) |
set content
TYPE Math::rectangle< TYPE >::width | ( | ) | const |
return width
TYPE Math::rectangle< TYPE >::bottom |
TYPE Math::rectangle< TYPE >::left |
TYPE Math::rectangle< TYPE >::right |
TYPE Math::rectangle< TYPE >::top |