31 #ifndef __CLAW_RECTANGLE_HPP__
32 #define __CLAW_RECTANGLE_HPP__
69 rectangle(
const value_type& _x,
const value_type& _y,
70 const value_type& _width,
const value_type& _height);
74 const value_type& _height );
82 bool operator==(
const self_type& that )
const;
83 bool operator!=(
const self_type& that )
const;
85 value_type area()
const;
87 bool includes(
const self_type& r )
const;
88 bool intersects(
const self_type& r )
const;
89 self_type intersection(
const self_type& r )
const;
90 self_type join(
const self_type& r )
const;
92 void set(
const value_type& new_x,
const value_type& new_y,
93 const value_type& new_width,
const value_type& new_height );
95 value_type left()
const;
96 value_type right()
const;
97 value_type bottom()
const;
98 value_type top()
const;
103 void x_intersection(
const self_type& r, self_type& result )
const;
104 void y_intersection(
const self_type& r, self_type& result )
const;
120 #include <claw/impl/rectangle.tpp>
122 #endif // __CLAW_RECTANGLE_HPP__
Coordinates in a two dimensional space.
A rectangle represented by two points in a 2D space.
rectangle< value_type > self_type
The type of the current class.
T value_type
The type of the values we store.
Coordinates in a two dimensional space.
coordinate_2d< value_type > position
value_typeop left coordinates.
A rectangle represented by two points in a 2D space.
A class representing a rectangle by his x,y coordinates, width and height.
This is the main namespace.