#include <rectangle.h>
Public Types | |
enum | { dim = RECTANGLE_DIMENSION } |
typedef bool(rectangle::* | comparator )(rectangle const &r) const |
Public Member Functions | |
void | operator+= (rectangle const &r) |
rectangle | operator+ (rectangle const &r) const |
bool | operator& (rectangle const &r) const |
bool | operator<= (rectangle const &r) const |
bool | operator>= (rectangle const &r) const |
bool | operator< (rectangle const &r) const |
bool | operator> (rectangle const &r) const |
bool | operator== (rectangle const &r) const |
bool | operator!= (rectangle const &r) const |
Public Attributes | |
coord_t | boundary [dim *2] |
Friends | |
coord_t GIGABASE_DLL_ENTRY | distance (rectangle const &r, rectangle const &q) |
area_t | area (rectangle const &r) |
Multidimensional rectangle
bool rectangle::operator!= | ( | rectangle const & | r | ) | const [inline] |
Check if two rectangle are not the same
References boundary.
bool rectangle::operator& | ( | rectangle const & | r | ) | const [inline] |
Intersect two rectangles
References boundary.
Join two rectangles: construct enveloping rectangle
References boundary.
void rectangle::operator+= | ( | rectangle const & | r | ) | [inline] |
Join two rectangles: construct enveloping rectangle
References boundary.
bool rectangle::operator< | ( | rectangle const & | r | ) | const [inline] |
Check if rectangle is strict subpart of other rectanle
true
if this rectangle is part of rectangle r
and not the same bool rectangle::operator<= | ( | rectangle const & | r | ) | const [inline] |
Check if rectangle is part of other rectanle
true
if this rectangle is part of rectangle r
References boundary.
bool rectangle::operator== | ( | rectangle const & | r | ) | const [inline] |
Check if two rectangle are the same
References boundary.
bool rectangle::operator> | ( | rectangle const & | r | ) | const [inline] |
Check if rectangle is strict subpart of other rectanle
true
if this rectangle contains rectangle r
and not the same bool rectangle::operator>= | ( | rectangle const & | r | ) | const [inline] |
Check if rectangle is part of other rectanle
true
if this rectangle contains rectangle r
References boundary.
area_t area | ( | rectangle const & | r | ) | [friend] |
Caclulate area of rectangle
Calculate distance between two rectangles
coord_t rectangle::boundary[dim *2] |
Boundary array contains coordinates of two vertices specifying rectangle of "dim" dimmension. First vertex has coordinaes (boundary[0], ..., boundary[dim]) Second vertext has coordinates (boundary[dim], ..., boundary[dim*2-1]) Precondition: for i = 0, dim : boundary[i] <= boundary[dim+i]
Referenced by operator!=(), operator&(), operator+(), operator+=(), operator<=(), operator==(), and operator>=().