Public Member Functions | |
| TBBox2D () | |
| TBBox2D (const TVector2 &min, const TVector2 &max) | |
| TBBox2D (const TVector2 &max) | |
| void | SetMax (const TVector2 &max) |
| Setter function for fMax. | |
| void | SetMin (const TVector2 &min) |
| Setter function for fMin. | |
| void | GetCenter (TVector2 ¢er) const |
| void | GetDelta (TVector2 &delta) const |
| real | GetMax () const |
| boolean | IsEmpty () const |
| void | AddPoint (const TVector2 &PP) |
| void | Inset (const TVector2 &PP) |
| TVector2 | operator[] (int16 ii) const |
| void | FixInvertedFields () |
| boolean | IsInside (const TVector2 &point) const |
| void | ClipBy (const TBBox2D &clipBounds) |
| boolean | Intersect (const TBBox2D &boundingBox) const |
| real | GetWidth (void) const |
| Returns the width (in x) of the box. | |
| real | GetHeight (void) const |
| Returns the height (in y) of the box. | |
| boolean | operator== (const TBBox2D &rhs) |
| Returns true if the two boxes are equal. | |
Public Attributes | |
| TVector2 | fMin |
| The lower corner of the box. | |
| TVector2 | fMax |
| The upper corner of the box. | |
|
|
Default constructor: fMin is initialized with kRealMax, fMax with kRealMin |
|
||||||||||||
|
Init constructor
|
|
|
Init constructor
|
|
|
Expands the box to encompass the given point
|
|
|
Clips the box by another box
|
|
|
if (#fMin.x > #fMax.x) {#fMin.x= #fMax.x= kRealZero;} and same for y |
|
|
Computes the center of the box
|
|
|
Computes the main diagonal of the box (fMax - fMin)
|
|
|
Returns the height (in y) of the box.
|
|
|
Returns the bigger coordinate of the diagonal |
|
|
Returns the width (in x) of the box.
|
|
|
Shrinks the box by adding PP to fMin, and substracting it from fMax
|
|
|
Returns true if the two boxes intersect
|
|
|
Returns true if the box is empty |
|
|
Returns true if the point is inside the box.
|
|
|
Returns true if the two boxes are equal.
|
|
|
Returns one of the corners of the box
|
|
|
Setter function for fMax.
|
|
|
Setter function for fMin.
|
|
|
The upper corner of the box.
|
|
|
The lower corner of the box.
|
1.3.9.1