2D rectangle class All the utilities assume that the rectangle is normalized, e.g.
More...
|
| | CustomRectangle () |
| |
| | CustomRectangle (const CustomPoint< numeric > &a, const CustomPoint< numeric > &b) |
| |
| | CustomRectangle (numeric x1, numeric y1, numeric x2, numeric y2) |
| |
| bool | operator== (const CustomRectangle< numeric > &other) const |
| |
| bool | operator!= (const CustomRectangle< numeric > &other) const |
| |
| bool | empty () const |
| |
| CustomRectangle | operator* (numeric _) const |
| |
| CustomRectangle | operator/ (numeric _) const |
| |
| CustomRectangle | operator* (const CustomPoint< numeric > &_) const |
| |
| CustomRectangle | operator/ (const CustomPoint< numeric > &_) const |
| |
| numeric | getX1 () const |
| |
| numeric | getY1 () const |
| |
| numeric | getX2 () const |
| |
| numeric | getY2 () const |
| |
| numeric | width () const |
| |
| numeric | height () const |
| |
| numeric | getArea () const |
| | Computes the rectangle area. More...
|
| |
| void | normalize () |
| | Flips corners coordinates guaranteeing that it has a non negative area, i.e. More...
|
| |
| void | translate (numeric x, numeric y) |
| | Translates the box. More...
|
| |
| void | translate (const CustomPoint< numeric > pt) |
| |
| void | scale (numeric x, numeric y) |
| | Scales the box. More...
|
| |
| void | limit (const CustomRectangle &frame) |
| | Truncates a rectangle to a limiting frame. More...
|
| |
| CustomRectangle | translated (numeric x, numeric y) const |
| | Returns a translated box. More...
|
| |
| CustomRectangle | translated (CustomPoint< numeric > by) const |
| |
| bool | isInside (const CustomPoint< numeric > &point) const |
| | Test if a point is inside the rectangle (or on its the border) More...
|
| |
| bool | isInsideHalfOpened (const CustomPoint< numeric > &point) const |
| | Test if a point is inside the rectangle including left and top borders, but excluding right and bottom. More...
|
| |
| short int | horizontalPositioningTest (numeric x) const |
| | Rectangle positioning test with respect to a given vertical line. More...
|
| |
| short int | verticalPositioningTest (numeric y) const |
| | Rectangle positioning test with respect to a given horizontal line. More...
|
| |
| void | grow (numeric r) |
| |
| CustomRectangle< numeric > | split (const int part, const int totalParts) |
| |
| | operator CustomRectangle< float > () const |
| | Typecast to float-valued coordinates. More...
|
| |
| void | getMapping (const CustomRectangle &target, CustomPoint< float > &scale, CustomPoint< float > &offset) const |
| | Finds a linear mapping of the rectangle onto another rectangle. More...
|
| |
template<typename numeric>
class Beatmup::CustomRectangle< numeric >
2D rectangle class All the utilities assume that the rectangle is normalized, e.g.
its area is not negative
Definition at line 129 of file geometry.h.