Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpRectOriented Class Reference

#include <vpRectOriented.h>

Public Member Functions

 vpRectOriented ()
 vpRectOriented (const vpRectOriented &)=default
 vpRectOriented (const vpImagePoint &center, double width, double height, double theta=0)
VP_EXPLICIT vpRectOriented (const vpRect &rect)
vpRectOrientedoperator= (const vpRectOriented &)=default
vpRectOrientedoperator= (const vpRect &rect)
VP_EXPLICIT operator vpRect ()
void setCenter (const vpImagePoint &center)
void setPoints (const vpImagePoint &topLeft, const vpImagePoint &topRight, const vpImagePoint &bottomLeft, const vpImagePoint &bottomRight)
vpImagePoint getCenter () const
vpImagePoint getTopLeft () const
vpImagePoint getTopRight () const
vpImagePoint getBottomLeft () const
vpImagePoint getBottomRight () const
void setSize (double width, double height)
double getWidth () const
double getHeight () const
void setOrientation (double theta)
double getOrientation () const
bool isInside (const vpImagePoint &point) const

Detailed Description

Defines an oriented rectangle in the plane.

Examples
testXmlParserRectOriented.cpp.

Definition at line 47 of file vpRectOriented.h.

Constructor & Destructor Documentation

◆ vpRectOriented() [1/4]

BEGIN_VISP_NAMESPACE vpRectOriented::vpRectOriented ( )

Default constructor.

Definition at line 39 of file vpRectOriented.cpp.

Referenced by operator=(), operator=(), and vpRectOriented().

◆ vpRectOriented() [2/4]

vpRectOriented::vpRectOriented ( const vpRectOriented & )
default

References vpRectOriented().

◆ vpRectOriented() [3/4]

vpRectOriented::vpRectOriented ( const vpImagePoint & center,
double width,
double height,
double theta = 0 )

Constructor.

Parameters
centerThe rectangle center.
widthThe rectangle width.
heightThe rectangle height.
thetaThe rectangle orientation (rad).

Definition at line 49 of file vpRectOriented.cpp.

◆ vpRectOriented() [4/4]

vpRectOriented::vpRectOriented ( const vpRect & rect)

Copy constructor.

Parameters
rectRectangle to copy.

Definition at line 68 of file vpRectOriented.cpp.

References vpRect::getCenter(), vpRect::getHeight(), and vpRect::getWidth().

Member Function Documentation

◆ getBottomLeft()

vpImagePoint vpRectOriented::getBottomLeft ( ) const

Get the bottom-left corner.

Definition at line 181 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getBottomRight()

vpImagePoint vpRectOriented::getBottomRight ( ) const

Get the bottom-right corner.

Definition at line 184 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getCenter()

vpImagePoint vpRectOriented::getCenter ( ) const

Get the rectangle center point.

Examples
testXmlParserRectOriented.cpp.

Definition at line 172 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getHeight()

double vpRectOriented::getHeight ( ) const

Get the rectangle height.

Examples
testXmlParserRectOriented.cpp.

Definition at line 206 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getOrientation()

double vpRectOriented::getOrientation ( ) const

Get the rectangle orientation (rad).

Examples
testXmlParserRectOriented.cpp.

Definition at line 224 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getTopLeft()

vpImagePoint vpRectOriented::getTopLeft ( ) const

Get the top-left corner.

Definition at line 175 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getTopRight()

vpImagePoint vpRectOriented::getTopRight ( ) const

Get the top-right corner.

Definition at line 178 of file vpRectOriented.cpp.

Referenced by operator=().

◆ getWidth()

double vpRectOriented::getWidth ( ) const

Get the rectangle width.

Examples
testXmlParserRectOriented.cpp.

Definition at line 203 of file vpRectOriented.cpp.

Referenced by operator=().

◆ isInside()

bool vpRectOriented::isInside ( const vpImagePoint & point) const

Check whether the point is inside the rectangle.

Definition at line 227 of file vpRectOriented.cpp.

Referenced by operator=().

◆ operator vpRect()

vpRectOriented::operator vpRect ( )

Conversion to vpRect operator.

Definition at line 131 of file vpRectOriented.cpp.

References vpException::badValue.

◆ operator=() [1/2]

vpRectOriented & vpRectOriented::operator= ( const vpRect & rect)

Assignment operator from vpRect.

Parameters
rectRectangle to copy.

Definition at line 110 of file vpRectOriented.cpp.

References vpRect::getCenter(), vpRect::getHeight(), vpRect::getWidth(), and vpRectOriented().

◆ operator=() [2/2]

◆ setCenter()

void vpRectOriented::setCenter ( const vpImagePoint & center)

Set the center of the rectangle.

Definition at line 162 of file vpRectOriented.cpp.

Referenced by operator=().

◆ setOrientation()

void vpRectOriented::setOrientation ( double theta)

Set the rectangle orientation (rad).

Definition at line 209 of file vpRectOriented.cpp.

Referenced by operator=().

◆ setPoints()

void vpRectOriented::setPoints ( const vpImagePoint & topLeft,
const vpImagePoint & topRight,
const vpImagePoint & bottomLeft,
const vpImagePoint & bottomRight )

Set the corners of the rectangle.

Warning
This method doesn't check whether the 4 points actually form a rectangle! The behaviour is undefined if it is not the case.

Definition at line 145 of file vpRectOriented.cpp.

References vpImagePoint::set_i().

Referenced by operator=().

◆ setSize()

void vpRectOriented::setSize ( double width,
double height )

Set the size of the rectangle : performs a homothety relatively to the rectangle center.

Definition at line 187 of file vpRectOriented.cpp.

Referenced by operator=().