21 class OrientedBoundingBox;
77 bool copy =
false)
const;
131 bool relative =
true);
348 bool relative =
true);
461 bool robust =
false);
math::float4 color
Definition: LineSetBuffers.cpp:45
bool copy
Definition: VtkUtils.cpp:73
Tensor Prod(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1229
Tensor Max(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1243
A bounding box that is aligned along the coordinate axes and defined by the min_bound and max_bound.
Definition: BoundingVolume.h:160
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:25
A bounding box that is aligned along the coordinate axes and defined by the min_bound and max_bound.
Definition: BoundingVolume.h:46
double GetZPercentage(double z) const
Definition: BoundingVolume.cpp:192
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.h:178
core::Tensor GetMinBound() const
Definition: BoundingVolume.h:113
core::Dtype GetDtype() const
Returns the data type attribute of this AxisAlignedBoundingBox.
Definition: BoundingVolume.h:69
static AxisAlignedBoundingBox FromLegacy(const open3d::geometry::AxisAlignedBoundingBox &box, const core::Dtype &dtype=core::Float32, const core::Device &device=core::Device("CPU:0"))
Definition: BoundingVolume.cpp:265
void SetMinBound(const core::Tensor &min_bound)
Set the min bound of the box. If the data type of the given tensor differs from the data type of the ...
Definition: BoundingVolume.cpp:73
core::Tensor GetBoxPoints() const
Returns the eight points that define the bounding box.
Definition: BoundingVolume.cpp:198
OrientedBoundingBox GetOrientedBoundingBox() const
Convert to an oriented box.
Definition: BoundingVolume.cpp:261
void SetColor(const core::Tensor &color)
Set the color of the box. If the data type of the given tensor differs from the data type of the box,...
Definition: BoundingVolume.cpp:109
double GetYPercentage(double y) const
Definition: BoundingVolume.cpp:186
double GetMaxExtent() const
Returns the maximum extent, i.e. the maximum of X, Y and Z axis' extents.
Definition: BoundingVolume.h:161
core::Dtype dtype_
The data type of the bounding box.
Definition: BoundingVolume.h:225
virtual ~AxisAlignedBoundingBox() override
Definition: BoundingVolume.h:63
open3d::geometry::AxisAlignedBoundingBox ToLegacy() const
Convert to a legacy Open3D axis-aligned box.
Definition: BoundingVolume.cpp:248
AxisAlignedBoundingBox Clone() const
Returns copy of the AxisAlignedBoundingBox on the same device.
Definition: BoundingVolume.h:80
std::string ToString() const
Text description.
Definition: BoundingVolume.cpp:225
core::Tensor GetExtent() const
Get the extent/length of the bounding box in x, y, and z dimension.
Definition: BoundingVolume.h:154
AxisAlignedBoundingBox & operator+=(const AxisAlignedBoundingBox &other)
Add operation for axis-aligned bounding box. The device of other box must be the same as the device o...
Definition: BoundingVolume.cpp:161
core::Tensor max_bound_
The upper x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:229
AxisAlignedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:66
AxisAlignedBoundingBox & Scale(double scale, const utility::optional< core::Tensor > ¢er=utility::nullopt)
Scale the axis-aligned box. If is the min_bound and is the max_bound of the axis aligned bounding b...
Definition: BoundingVolume.cpp:143
core::Tensor GetColor() const
Definition: BoundingVolume.h:117
void SetMaxBound(const core::Tensor &max_bound)
Set the max bound of the box. If the data type of the given tensor differs from the data type of the ...
Definition: BoundingVolume.cpp:91
core::Tensor GetCenter() const
Definition: BoundingVolume.h:119
AxisAlignedBoundingBox(const core::Device &device=core::Device("CPU:0"))
Construct an empty AxisAlignedBoundingBox on the provided device.
Definition: BoundingVolume.cpp:18
core::Device device_
The device to use for the bounding box. The default is CPU:0.
Definition: BoundingVolume.h:223
core::Tensor GetMaxBound() const
Definition: BoundingVolume.h:115
AxisAlignedBoundingBox & Translate(const core::Tensor &translation, bool relative=true)
Translate the axis-aligned box by the given translation.
Definition: BoundingVolume.cpp:125
core::Tensor min_bound_
The lower x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:227
core::Tensor color_
The color of the bounding box in RGB. The default is white.
Definition: BoundingVolume.h:231
core::Tensor GetHalfExtent() const
Returns the half extent of the bounding box.
Definition: BoundingVolume.h:157
core::Device GetDevice() const override
Returns the device attribute of this AxisAlignedBoundingBox.
Definition: BoundingVolume.h:66
double GetXPercentage(double x) const
Definition: BoundingVolume.cpp:180
AxisAlignedBoundingBox To(const core::Device &device, bool copy=false) const
Transfer the AxisAlignedBoundingBox to a specified device.
Definition: BoundingVolume.cpp:54
core::Tensor GetPointIndicesWithinBoundingBox(const core::Tensor &points) const
Indices to points that are within the bounding box.
Definition: BoundingVolume.cpp:209
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.h:86
static AxisAlignedBoundingBox CreateFromPoints(const core::Tensor &points)
Definition: BoundingVolume.cpp:232
Mix-in class for geometry types that can be visualized.
Definition: DrawableGeometry.h:19
The base geometry class.
Definition: Geometry.h:21
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:257
static OrientedBoundingBox CreateFromAxisAlignedBoundingBox(const AxisAlignedBoundingBox &aabb)
Definition: BoundingVolume.cpp:532
core::Dtype dtype_
Definition: BoundingVolume.h:465
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.h:384
void SetRotation(const core::Tensor &rotation)
Set the rotation matrix of the box. If the data type of the given tensor differs from the data type o...
Definition: BoundingVolume.cpp:375
core::Tensor center_
Definition: BoundingVolume.h:466
static OrientedBoundingBox CreateFromPoints(const core::Tensor &points, bool robust=false)
Definition: BoundingVolume.cpp:568
OrientedBoundingBox & Scale(double scale, const utility::optional< core::Tensor > ¢er=utility::nullopt)
Scale the axis-aligned box. If is the min_bound and is the max_bound of the axis aligned bounding b...
Definition: BoundingVolume.cpp:478
core::Dtype GetDtype() const
Returns the data type attribute of this OrientedBoundingBox.
Definition: BoundingVolume.h:284
static OrientedBoundingBox FromLegacy(const open3d::geometry::OrientedBoundingBox &box, const core::Dtype &dtype=core::Float32, const core::Device &device=core::Device("CPU:0"))
Definition: BoundingVolume.cpp:541
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.h:298
core::Tensor extent_
Definition: BoundingVolume.h:468
core::Tensor GetColor() const
Definition: BoundingVolume.h:332
core::Tensor GetCenter() const
Definition: BoundingVolume.h:334
core::Tensor GetPointIndicesWithinBoundingBox(const core::Tensor &points) const
Indices to points that are within the bounding box.
Definition: BoundingVolume.cpp:493
core::Tensor rotation_
Definition: BoundingVolume.h:467
void SetCenter(const core::Tensor ¢er)
Set the center of the box. If the data type of the given tensor differs from the data type of the box...
Definition: BoundingVolume.cpp:353
OrientedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:345
core::Tensor GetRotation() const
Definition: BoundingVolume.h:336
OrientedBoundingBox & Transform(const core::Tensor &transformation)
Transform the oriented box by the given transformation matrix.
Definition: BoundingVolume.cpp:462
core::Tensor GetMaxBound() const
Definition: BoundingVolume.cpp:408
core::Device device_
Definition: BoundingVolume.h:464
void SetColor(const core::Tensor &color)
Set the color of the box.
Definition: BoundingVolume.cpp:389
std::string ToString() const
Text description.
Definition: BoundingVolume.cpp:510
open3d::geometry::OrientedBoundingBox ToLegacy() const
Convert to a legacy Open3D oriented box.
Definition: BoundingVolume.cpp:515
OrientedBoundingBox & Rotate(const core::Tensor &rotation, const utility::optional< core::Tensor > ¢er=utility::nullopt)
Rotate the oriented box by the given rotation matrix. If the rotation matrix is not orthogonal,...
Definition: BoundingVolume.cpp:433
virtual ~OrientedBoundingBox() override
Definition: BoundingVolume.h:278
OrientedBoundingBox(const core::Device &device=core::Device("CPU:0"))
Construct an empty OrientedBoundingBox on the provided device.
Definition: BoundingVolume.cpp:290
core::Device GetDevice() const override
Returns the device attribute of this OrientedBoundingBox.
Definition: BoundingVolume.h:281
OrientedBoundingBox To(const core::Device &device, bool copy=false) const
Definition: BoundingVolume.cpp:332
AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const
Convert to an axis-aligned box.
Definition: BoundingVolume.cpp:528
core::Tensor color_
Definition: BoundingVolume.h:469
void SetExtent(const core::Tensor &extent)
Set the extent of the box. If the data type of the given tensor differs from the data type of the box...
Definition: BoundingVolume.cpp:361
core::Tensor GetMinBound() const
Definition: BoundingVolume.cpp:404
core::Tensor GetBoxPoints() const
Returns the eight points that define the bounding box.
Definition: BoundingVolume.cpp:412
OrientedBoundingBox & Translate(const core::Tensor &translation, bool relative=true)
Translate the oriented box by the given translation. If relative is true, the translation is added to...
Definition: BoundingVolume.cpp:418
core::Tensor GetExtent() const
Definition: BoundingVolume.h:338
OrientedBoundingBox Clone() const
Returns copy of the OrientedBoundingBox on the same device.
Definition: BoundingVolume.h:294
Definition: Optional.h:259
const Dtype Float64
Definition: Dtype.cpp:43
const Dtype Float32
Definition: Dtype.cpp:42
constexpr nullopt_t nullopt
Definition: Optional.h:152
Definition: PinholeCameraIntrinsic.cpp:16