open3d.geometry.OrientedBoundingBox

class open3d.geometry.OrientedBoundingBox

Class that defines an oriented box that can be computed from 3D geometries.

class Type

Enum class for Geometry types.

HalfEdgeTriangleMesh = Type.HalfEdgeTriangleMesh
Image = Type.Image
LineSet = Type.LineSet
PointCloud = Type.PointCloud
RGBDImage = Type.RGBDImage
TetraMesh = Type.TetraMesh
TriangleMesh = Type.TriangleMesh
Unspecified = Type.Unspecified
VoxelGrid = Type.VoxelGrid
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: open3d.cpu.pybind.geometry.OrientedBoundingBox) -> None

Default constructor

  1. __init__(self: open3d.cpu.pybind.geometry.OrientedBoundingBox, arg0: open3d.cpu.pybind.geometry.OrientedBoundingBox) -> None

Copy constructor

  1. __init__(self: open3d.cpu.pybind.geometry.OrientedBoundingBox, center: numpy.ndarray[float64[3, 1]], R: numpy.ndarray[float64[3, 3]], extent: numpy.ndarray[float64[3, 1]]) -> None

Create OrientedBoudingBox from center, rotation R and extent in x, y and z direction

clear(self)

Clear all elements in the geometry.

Returns

open3d.cpu.pybind.geometry.Geometry

static create_from_axis_aligned_bounding_box(aabox)

Returns an oriented bounding box from the AxisAlignedBoundingBox.

Parameters

aabox (open3d.geometry.AxisAlignedBoundingBox) – AxisAlignedBoundingBox object from which OrientedBoundingBox is created.

Returns

open3d.cpu.pybind.geometry.OrientedBoundingBox

static create_from_points(points)

Creates the bounding box that encloses the set of points.

Parameters

points (open3d.cpu.pybind.utility.Vector3dVector) – A list of points.

Returns

open3d.cpu.pybind.geometry.OrientedBoundingBox

dimension(self)

Returns whether the geometry is 2D or 3D.

Returns

int

get_axis_aligned_bounding_box(self)

Returns an axis-aligned bounding box of the geometry.

Returns

open3d.geometry.AxisAlignedBoundingBox

get_box_points(self)

Returns the eight points that define the bounding box.

Returns

open3d.cpu.pybind.utility.Vector3dVector

get_center(self)

Returns the center of the geometry coordinates.

Returns

numpy.ndarray[float64[3, 1]]

get_geometry_type(self)

Returns one of registered geometry types.

Returns

open3d.geometry.Geometry.GeometryType

get_max_bound(self)

Returns max bounds for geometry coordinates.

Returns

numpy.ndarray[float64[3, 1]]

get_min_bound(self)

Returns min bounds for geometry coordinates.

Returns

numpy.ndarray[float64[3, 1]]

get_oriented_bounding_box(self)

Returns an oriented bounding box of the geometry.

Returns

open3d.geometry.OrientedBoundingBox

get_point_indices_within_bounding_box(self, points)

Return indices to points that are within the bounding box.

Parameters

points (open3d.cpu.pybind.utility.Vector3dVector) – A list of points.

Returns

List[int]

static get_rotation_matrix_from_axis_angle(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_quaternion(rotation: numpy.ndarray[float64[4, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_xyz(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_xzy(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_yxz(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_yzx(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_zxy(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_zyx(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
is_empty(self)

Returns True iff the geometry is empty.

Returns

bool

OrientedBoundingBox.rotate(R, R, center)

Apply rotation to the geometry coordinates and normals.

Parameters
  • R (numpy.ndarray[float64[3, 3]]) – The rotation matrix

  • R – The rotation matrix

  • center (numpy.ndarray[float64[3, 1]]) – Rotation center used for transformation

Returns

open3d.cpu.pybind.geometry.Geometry3D

OrientedBoundingBox.scale(scale, center, scale, center)

Apply scaling to the geometry coordinates.

Parameters
  • scale (float) – The scale parameter that is multiplied to the points/vertices of the geometry

  • center (numpy.ndarray[float64[3, 1]]) – Scale center used for transformation

  • scale – The scale parameter that is multiplied to the points/vertices of the geometry

  • center – Scale center used for transformation

Returns

open3d.cpu.pybind.geometry.Geometry3D

transform(self, arg0)

Apply transformation (4x4 matrix) to the geometry coordinates.

Parameters

arg0 (numpy.ndarray[float64[4, 4]]) –

Returns

open3d.cpu.pybind.geometry.Geometry3D

translate(self, translation, relative=True)

Apply translation to the geometry coordinates.

Parameters
  • translation (numpy.ndarray[float64[3, 1]]) – A 3D vector to transform the geometry

  • relative (bool, optional, default=True) – If true, the translation vector is directly added to the geometry coordinates. Otherwise, the center is moved to the translation vector.

Returns

open3d.cpu.pybind.geometry.Geometry3D

volume(self)

Returns the volume of the bounding box.

Returns

float

HalfEdgeTriangleMesh = Type.HalfEdgeTriangleMesh
Image = Type.Image
LineSet = Type.LineSet
PointCloud = Type.PointCloud
property R

float64 array of shape (3,3 )

RGBDImage = Type.RGBDImage
TetraMesh = Type.TetraMesh
TriangleMesh = Type.TriangleMesh
Unspecified = Type.Unspecified
VoxelGrid = Type.VoxelGrid
property center

float64 array of shape (3, )

property color

float64 array of shape (3, )

property extent

float64 array of shape (3, )