#include <glrectangle.h>
Public Member Functions | |
void | Set (T _xmin, T _ymin, T _xmax, T _ymax) |
Initialize. Convenience function. | |
void | Zero () |
Set all the members to zero. | |
void | FromPair (T x0, T y0, T x1, T y1) |
Creates the rectangle from 2 points, which can be in any relationship to each other. | |
bool | Intersect (const Rectangle2< T > &rect) const |
Return true if the rectangles intersect. | |
bool | Contains (const Rectangle2< T > &rect) const |
Return true if 'rect' is inside this. | |
void | DoUnion (const Rectangle2< T > &rect) |
Merge the rect into this. | |
void | DoUnion (T x, T y) |
Merge the rect into this. | |
void | DoIntersection (const Rectangle2< T > &rect) |
Turn this into the intersection. | |
void | DoClip (const Rectangle2< T > &rect) |
Clip this to the passed in rectangle. Will become invalid if they don't intersect. | |
void | Scale (T x, T y) |
Scale all coordinates by the given ratios:. | |
void | EdgeAdd (T i) |
Changes the boundaries. | |
void | Edge (int i, Vector2< T > *head, Vector2< T > *tail) |
Query the edge of the rectangle. The edges are ordered: bottom, right, top, left. |