|
Public Member Functions |
| EMMA_EXPORT | Box2f () |
| | Default constructor - leaves box totally empty.
|
| EMMA_EXPORT | Box2f (float xmin, float ymin, float xmax, float ymax) |
| | Constructor given bounds.
|
| EMMA_EXPORT | Box2f (const Fusion::Vec2f &_min, const Fusion::Vec2f &_max) |
| | Constructor given minimum and maximum points.
|
| | ~Box2f () |
| const Fusion::Vec2f & | getMin () const |
| | Returns the min and max points.
|
| const Fusion::Vec2f & | getMax () const |
| Fusion::Vec2f | getCenter () const |
| | Returns the center of a box.
|
| EMMA_EXPORT void | extendBy (const Fusion::Vec2f &pt) |
| | Extends Box2f (if necessary) to contain given 2D point.
|
| EMMA_EXPORT void | extendBy (const Box2f &r) |
| | Extends Box2f (if necessary) to contain given Box2f.
|
| EMMA_EXPORT bool | intersect (const Fusion::Vec2f &pt) const |
| | Returns TRUE if intersection of given point and Box2f is not empty.
|
| EMMA_EXPORT bool | intersect (const Box2f &bb) const |
| | Returns TRUE if intersection of given Box2f and Box2f is not empty.
|
| void | setBounds (float xmin, float ymin, float xmax, float ymax) |
| | Common get and set functions.
|
| void | setBounds (const Fusion::Vec2f &_min, const Fusion::Vec2f &_max) |
| void | getBounds (float &xmin, float &ymin, float &xmax, float &ymax) const |
| void | getBounds (Fusion::Vec2f &_min, Fusion::Vec2f &_max) const |
| Fusion::Vec2f | getClosestPoint (const Fusion::Vec2f &point) |
| | Returns the closest point on the box to the given point.
|
| void | getOrigin (float &originX, float &originY) const |
| | Returns origin (minimum point) of box.
|
| void | getSize (float &sizeX, float &sizeY) const |
| | Returns size of box.
|
| float | getAspectRatio () const |
| | Returns aspect ratio (ratio of width to height) of box.
|
| EMMA_EXPORT void | makeEmpty () |
| | Sets rect to contain nothing.
|
| bool | isEmpty () const |
| | Checks if the box is empty (degenerate) note that this relies on boxes being completely degenerate if they are degenerate at all.
|
| bool | hasArea () const |
| | Checks if the box has area; i.e.
|
Friends |
| int | operator== (const Box2f &b1, const Box2f &b2) |
| | Equality comparisons.
|
| int | operator!= (const Box2f &b1, const Box2f &b2) |