This is a Box2d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 2.
More...
|
std::string | name () const |
| Returns the name of the class. More...
|
|
CoordType | area () const |
| compute the area of the Box2d. More...
|
|
CoordType | width () const |
| compute the width of the Box2d. More...
|
|
CoordType | height () const |
| compute the height of the Box2d. More...
|
|
bool | contains (const point_type &p) const |
| Returns true if the box contains the point p. More...
|
|
void | translate (const dpoint_type &dp) |
| Translate the window along the deplacement dp the dimensions of the window are conserved. More...
|
|
bool | is_consistent () const |
| verify if the window is consistent, that is to say if the first point p1 has the smaller coordinates than p2 More...
|
|
void | swap (self &other) |
| Swaps two Box. More...
|
|
|
| Box2d () |
| Constructs a Box2d. More...
|
|
| Box2d (const Point< CoordType, 2 > &p1, const Point< CoordType, 2 > &p2) |
| Constructs a Box2d from a CoordType array. More...
|
|
| Box2d (const CoordType &x11, const CoordType &x12, const CoordType &x21, const CoordType &x22) |
| Constructs a Box2d. More...
|
|
| Box2d (const CoordType &xc, const CoordType &yc, const CoordType &w) |
| Constructs a square Box2d using a central point and a width. More...
|
|
| Box2d (const Point< CoordType, 2 > &pc, const CoordType &w) |
| Constructs a square Box2d using a central point and a width. More...
|
|
| Box2d (const Point< CoordType, 2 > &pc, const CoordType &w1, const CoordType &w2) |
| Constructs a square Box2d using a central point and two widths. More...
|
|
|
void | upper_left (Point< CoordType, 2 >) |
| Accessor/Mutator of the upper_left point (p1) of Box2d. More...
|
|
Point< CoordType, 2 > & | upper_left () |
| Accessor/Mutator of the upper_left point (p1) of Box2d. More...
|
|
const Point< CoordType, 2 > & | upper_left () const |
| Accessor/Mutator of the upper_left point (p1) of Box2d. More...
|
|
void | bottom_right (Point< CoordType, 2 >) |
| Accessor/Mutator of the bottom_right point (p2) of Box2d. More...
|
|
Point< CoordType, 2 > & | bottom_right () |
| Accessor/Mutator of the bottom_right point (p2) of Box2d. More...
|
|
const Point< CoordType, 2 > & | bottom_right () const |
| Accessor/Mutator of the bottom_right point (p2) of Box2d. More...
|
|
void | set_coord (const CoordType &x11, const CoordType &x12, const CoordType &x21, const CoordType &x22) |
| Mutator of the coordinates of the Box2d. More...
|
|
|
bool | operator== (const self &other) const |
| compare two Box. More...
|
|
bool | operator!= (const self &other) const |
| compare two Box. More...
|
|
template<typename CoordType>
class slip::Box2d< CoordType >
This is a Box2d class, a specialized version of slip::Box<CoordType,DIM> with DIM = 2.
- Author
- Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
-
Julien Dombre <dombre_AT_sic.univ-poitiers.fr>
- Version
- 0.0.3
- Date
- 2014/03/15
- Since
- 1.0.0
- Description:
- The box is defined by its upper-left and bottom-right points p1 and p2.
p1--------
| |
| |
| |
| |
---------p2
- Parameters
-
CoordType | Type of the coordinates of the Box2d |
Definition at line 116 of file Box2d.hpp.