80 #include <visp/vpImagePoint.h>
87 vpRect(
double left,
double top,
double width,
double height);
98 inline double getBottom()
const {
return (this->top + this->height - 1.0); };
105 bottomRight.
set_u( getRight() );
106 bottomRight.
set_v( getBottom() );
122 x = this->left + this->width / 2.0 - 0.5;
123 y = this->top + this->height / 2.0 - 0.5;
138 center.
set_u( this->left + this->width / 2.0 - 0.5 );
139 center.
set_v( this->top + this->height / 2.0 - 0.5 );
150 inline double getHeight()
const {
return this->height; };
156 inline double getLeft()
const {
return this->left; };
162 inline double getRight()
const {
return (this->left + this->width - 1.0); };
169 inline double getTop()
const {
return this->top; };
177 topLeft.
set_u( this->left );
178 topLeft.
set_v( this->top );
188 inline double getWidth()
const {
return this->width; };
198 inline void setBottom(
double pos) { this->height = pos - this->top + 1.0; };
207 this->height = bottomRight.
get_v() - this->top + 1.0;
208 this->width = bottomRight.
get_u() - this->left + 1.0;
227 inline void setLeft(
double pos) { this->left = pos; };
234 inline void setRect(
double left,
double top,
double width,
double height) {
238 this->height = height;
249 inline void setRight(
double pos) { this->width = pos - this->left + 1.0; };
258 inline void setTop(
double pos) { this->top = pos; };
268 this->left = topLeft.
get_u();
269 this->top = topLeft.
get_v();
278 inline void setWidth(
double w) { this->width = w; }
289 this->left = x - this->width/2 + 0.5;
290 this->top = y - this->height/2 + 0.5;
void getCenter(double &x, double &y) const
vpImagePoint getTopLeft() const
void setRect(double left, double top, double width, double height)
void set_u(const double u)
vpImagePoint getBottomRight() const
void set_v(const double v)
void moveCenter(double x, double y)
void setTopLeft(const vpImagePoint &topLeft)
void setRight(double pos)
Defines a rectangle in the plane.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
vpImagePoint getCenter() const
void setBottomRight(const vpImagePoint &bottomRight)
void setBottom(double pos)