32 #ifndef Rect_INCLUDE_ONCE 33 #define Rect_INCLUDE_ONCE 69 T
x()
const {
return mX; }
70 T
y()
const {
return mY; }
95 T Bx2 = other.
right();
98 if (Ax1 < Bx1) Ax1 = Bx1;
99 if (Ay1 < By1) Ay1 = By1;
100 if (Ax2 > Bx2) Ax2 = Bx2;
101 if (Ay2 > By2) Ay2 = By2;
102 return Rect(Ax1,Ay1,Ax2-Ax1+1,Ay2-Ay1+1);
115 T Bx1 = other.
left();
116 T Bx2 = other.
right();
119 if (Ax1 > Bx1) Ax1 = Bx1;
120 if (Ay1 > By1) Ay1 = By1;
121 if (Ax2 < Bx2) Ax2 = Bx2;
122 if (Ay2 < By2) Ay2 = By2;
123 return Rect(Ax1,Ay1,Ax2-Ax1+1,Ay2-Ay1+1);
132 return mX < other.
mX;
141 return mY < other.
mY;
205 fvec2 tr = topRight();
206 fvec2 bl = bottomLeft();
Vector2< int > ivec2
A 2 components vector with int precision.
Rect(T x, T y, T width, T height)
RectI(int x, int y, int width, int height)
The RectI class represents a 2D rectangular area using int precision.
RectI & operator=(const Rect< int > &other)
void addPoint(const fvec2 &p)
RectI & operator=(const RectI &other)
Visualization Library main namespace.
bool operator<(const Rect &other) const
Defines a sort of lexicographic sorting that make possible the use of the Rect class with STL contain...
Vector2< float > fvec2
A 2 components vector with float precision.
The RectF class represents a 2D rectangular area using float precision.
RectF & operator=(const Rect< float > &other)
RectI(const RectI &other)
RectF(const Rect< float > &other)
Rect intersected(const Rect &other) const
RectI(const Rect< int > &other)
const T_Scalar & x() const
RectF & operator=(const RectF &other)
RectF(float x, float y, float width, float height)
const T_Scalar & y() const
Implements the common functions of RectI and RectF.
Rect united(const Rect &other) const
RectF(const RectF &other)