templated 2D rectangle More...
#include <geometry_2d.h>
Public Types | |
typedef point2d_t< T > | point_t |
Public Member Functions | |
rect2d_t (void) throw () | |
rect2d_t (IN T iLeft, IN T iTop, IN T iRight, IN T iBottom) throw () | |
void | inflate (IN const rect2d_t &r) throw () |
expand rect to fully contain input rect | |
bool | isValid (void) const throw () |
valid? | |
void | expand (IN T s) throw () |
expand rect in all dimensions by provided amount | |
bool | isEmpty (void) const throw () |
null size? | |
void | shift (IN T dx, IN T dy) throw () |
move rect by specified dx,dy amount | |
bool | contains (IN const point_t &pt) const throw () |
does this rect contain the specified point? | |
bool | contains (IN float x, IN float y) const throw () |
does this rect contain the specified point? | |
bool | contains (IN const rect2d_t &r) const throw () |
does this rect fully contain the specified rect? | |
bool | intersects (IN const rect2d_t &r) const throw () |
does this rect intersect the specified rect? | |
void | expandToInclude (IN const point_t &p) throw () |
expand to include the given point | |
void | expandToInclude (IN T x, IN T y) throw () |
expand to include the given point | |
void | set (IN T in_left, IN T in_top, IN T in_right, IN T in_bottom) throw () |
explicitly set the rect coordinates | |
void | fromPoints (IN const point_t &p0, IN const point_t &p1) throw () |
minimum bounding rect containing the two points | |
void | scale (IN float rX, IN float rY) throw () |
scale out in X and Y directions | |
void | clear (void) throw () |
reset rect to be null rectangle at (0,0) | |
void | dump (IN const char *title) const throw () |
debug helper to dump rectangle to std err | |
point_t | getTopLeft (void) const throw () |
return top left coordinate | |
point_t | getBottomRight (void) const throw () |
return top right coordinate | |
Public Attributes | |
T | left |
T | top |
T | right |
T | bottom |
templated 2D rectangle
Definition at line 135 of file geometry_2d.h.
Definition at line 136 of file geometry_2d.h.