RectOriented

class RectOriented(*args, **kwargs)

Bases: pybind11_object

Defines an oriented rectangle in the plane.

Overloaded function.

  1. __init__(self: visp._visp.core.RectOriented) -> None

Default constructor.

  1. __init__(self: visp._visp.core.RectOriented, arg0: visp._visp.core.RectOriented) -> None

  2. __init__(self: visp._visp.core.RectOriented, center: visp._visp.core.ImagePoint, width: float, height: float, theta: float = 0) -> None

Constructor.

Parameters:
center

The rectangle center.

width

The rectangle width.

height

The rectangle height.

theta

The rectangle orientation (rad).

  1. __init__(self: visp._visp.core.RectOriented, rect: visp._visp.core.Rect) -> None

Copy constructor.

Parameters:
rect

Rectangle to copy.

Methods

__init__

Overloaded function.

getBottomLeft

Get the bottom-left corner.

getBottomRight

Get the bottom-right corner.

getCenter

Get the rectangle center point.

getHeight

Get the rectangle height.

getOrientation

Get the rectangle orientation (rad).

getTopLeft

Get the top-left corner.

getTopRight

Get the top-right corner.

getWidth

Get the rectangle width.

isInside

Check whether the point is inside the rectangle.

setCenter

Set the center of the rectangle.

setOrientation

Set the rectangle orientation (rad).

setPoints

Set the corners of the rectangle.

setSize

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

Inherited Methods

Operators

__doc__

__init__

Overloaded function.

__module__

Attributes

__annotations__

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: visp._visp.core.RectOriented) -> None

Default constructor.

  1. __init__(self: visp._visp.core.RectOriented, arg0: visp._visp.core.RectOriented) -> None

  2. __init__(self: visp._visp.core.RectOriented, center: visp._visp.core.ImagePoint, width: float, height: float, theta: float = 0) -> None

Constructor.

Parameters:
center

The rectangle center.

width

The rectangle width.

height

The rectangle height.

theta

The rectangle orientation (rad).

  1. __init__(self: visp._visp.core.RectOriented, rect: visp._visp.core.Rect) -> None

Copy constructor.

Parameters:
rect

Rectangle to copy.

getBottomLeft(self) visp._visp.core.ImagePoint

Get the bottom-left corner.

getBottomRight(self) visp._visp.core.ImagePoint

Get the bottom-right corner.

getCenter(self) visp._visp.core.ImagePoint

Get the rectangle center point.

getHeight(self) float

Get the rectangle height.

getOrientation(self) float

Get the rectangle orientation (rad).

getTopLeft(self) visp._visp.core.ImagePoint

Get the top-left corner.

getTopRight(self) visp._visp.core.ImagePoint

Get the top-right corner.

getWidth(self) float

Get the rectangle width.

isInside(self, point: visp._visp.core.ImagePoint) bool

Check whether the point is inside the rectangle.

setCenter(self, center: visp._visp.core.ImagePoint) None

Set the center of the rectangle.

setOrientation(self, theta: float) None

Set the rectangle orientation (rad).

setPoints(self, topLeft: visp._visp.core.ImagePoint, topRight: visp._visp.core.ImagePoint, bottomLeft: visp._visp.core.ImagePoint, bottomRight: visp._visp.core.ImagePoint) None

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.

setSize(self, width: float, height: float) None

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