RectOriented¶
- class RectOriented(*args, **kwargs)¶
Bases:
pybind11_object
Defines an oriented rectangle in the plane.
Overloaded function.
__init__(self: visp._visp.core.RectOriented) -> None
Default constructor.
__init__(self: visp._visp.core.RectOriented, arg0: visp._visp.core.RectOriented) -> None
__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).
__init__(self: visp._visp.core.RectOriented, rect: visp._visp.core.Rect) -> None
Methods
Overloaded function.
Get the bottom-left corner.
Get the bottom-right corner.
Get the rectangle center point.
Get the rectangle height.
Get the rectangle orientation (rad).
Get the top-left corner.
Get the top-right corner.
Get the rectangle width.
Check whether the point is inside the rectangle.
Set the center of the rectangle.
Set the rectangle orientation (rad).
Set the corners of the rectangle.
Set the size of the rectangle : performs a homothety relatively to the rectangle center.
Inherited Methods
Operators
__doc__
Overloaded function.
__module__
Attributes
__annotations__
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: visp._visp.core.RectOriented) -> None
Default constructor.
__init__(self: visp._visp.core.RectOriented, arg0: visp._visp.core.RectOriented) -> None
__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).
__init__(self: visp._visp.core.RectOriented, rect: visp._visp.core.Rect) -> None
- 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.
- getTopLeft(self) visp._visp.core.ImagePoint ¶
Get the top-left corner.
- getTopRight(self) visp._visp.core.ImagePoint ¶
Get the top-right corner.
- 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.
- 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.