|
Open3D (C++ API)
0.19.0
|
A bounding ellipsoid oriented along an arbitrary frame of reference. More...
#include <BoundingVolume.h>
Public Member Functions | |
| OrientedBoundingEllipsoid (const core::Device &device=core::Device("CPU:0")) | |
| Construct an empty OrientedBoundingEllipsoid on the provided device. More... | |
| OrientedBoundingEllipsoid (const core::Tensor ¢er, const core::Tensor &rotation, const core::Tensor &radii) | |
| Construct an OrientedBoundingEllipsoid from center, rotation and radii. More... | |
| virtual | ~OrientedBoundingEllipsoid () override |
| core::Device | GetDevice () const override |
| Returns the device attribute of this OrientedBoundingEllipsoid. More... | |
| core::Dtype | GetDtype () const |
| Returns the data type attribute of this OrientedBoundingEllipsoid. More... | |
| OrientedBoundingEllipsoid | To (const core::Device &device, const core::Dtype &dtype, bool copy=false) const |
| OrientedBoundingEllipsoid | Clone () const |
| Returns copy of the OrientedBoundingEllipsoid on the same device. More... | |
| OrientedBoundingEllipsoid & | Clear () override |
| Clear all elements in the geometry. More... | |
| bool | IsEmpty () const override |
| Returns true iff the geometry is empty. More... | |
| void | SetCenter (const core::Tensor ¢er) |
| Set the center of the ellipsoid. If the data type of the given tensor differs from the data type of the ellipsoid, an exception will be thrown. More... | |
| void | SetRotation (const core::Tensor &rotation) |
| Set the rotation matrix of the ellipsoid. If the data type of the given tensor differs from the data type of the ellipsoid, an exception will be thrown. More... | |
| void | SetRadii (const core::Tensor &radii) |
| Set the radii of the ellipsoid. If the data type of the given tensor differs from the data type of the ellipsoid, an exception will be thrown. More... | |
| void | SetColor (const core::Tensor &color) |
| Set the color of the ellipsoid. More... | |
| core::Tensor | GetMinBound () const |
| core::Tensor | GetMaxBound () const |
| core::Tensor | GetColor () const |
| core::Tensor | GetCenter () const |
| core::Tensor | GetRotation () const |
| core::Tensor | GetRadii () const |
| OrientedBoundingEllipsoid & | Translate (const core::Tensor &translation, bool relative=true) |
| Translate the oriented ellipsoid by the given translation. If relative is true, the translation is added to the center of the ellipsoid. If false, the center will be assigned to the translation. More... | |
| OrientedBoundingEllipsoid & | Rotate (const core::Tensor &rotation, const std::optional< core::Tensor > ¢er=std::nullopt) |
| Rotate the oriented ellipsoid by the given rotation matrix. If the rotation matrix is not orthogonal, the rotation will not be applied. The rotation center will be the ellipsoid center if it is not specified. More... | |
| OrientedBoundingEllipsoid & | Scale (double scale, const std::optional< core::Tensor > ¢er=std::nullopt) |
| Scale the oriented ellipsoid. The scaling center will be the ellipsoid center if it is not specified. More... | |
| double | Volume () const |
| Returns the volume of the bounding ellipsoid. More... | |
| core::Tensor | GetEllipsoidPoints () const |
| Returns the six critical points of the bounding ellipsoid. More... | |
| core::Tensor | GetPointIndicesWithinBoundingEllipsoid (const core::Tensor &points) const |
| Indices to points that are within the bounding ellipsoid. More... | |
| std::string | ToString () const |
| Text description. More... | |
| open3d::geometry::OrientedBoundingEllipsoid | ToLegacy () const |
| Convert to a legacy Open3D oriented bounding ellipsoid. More... | |
| AxisAlignedBoundingBox | GetAxisAlignedBoundingBox () const |
| Convert to an axis-aligned box. More... | |
| OrientedBoundingBox | GetOrientedBoundingBox (bool robust=false) const |
| Returns an oriented bounding box around the ellipsoid. More... | |
| OrientedBoundingBox | GetMinimalOrientedBoundingBox (bool robust=false) const |
| Returns the minimal oriented bounding box around the ellipsoid. More... | |
Public Member Functions inherited from open3d::t::geometry::Geometry | |
| virtual | ~Geometry () |
| GeometryType | GetGeometryType () const |
| Returns one of registered geometry types. More... | |
| int | Dimension () const |
| Returns whether the geometry is 2D or 3D. More... | |
| std::string | GetName () const |
| void | SetName (const std::string &name) |
Public Member Functions inherited from open3d::core::IsDevice | |
| IsDevice ()=default | |
| virtual | ~IsDevice ()=default |
| bool | IsCPU () const |
| bool | IsCUDA () const |
| bool | IsSYCL () const |
Static Public Member Functions | |
| static OrientedBoundingEllipsoid | FromLegacy (const open3d::geometry::OrientedBoundingEllipsoid &ellipsoid, const core::Dtype &dtype=core::Float32, const core::Device &device=core::Device("CPU:0")) |
| static OrientedBoundingEllipsoid | CreateFromPoints (const core::Tensor &points, bool robust=false) |
Protected Attributes | |
| core::Device | device_ = core::Device("CPU:0") |
| core::Dtype | dtype_ = core::Float32 |
| core::Tensor | center_ |
| core::Tensor | rotation_ |
| core::Tensor | radii_ |
| core::Tensor | color_ |
Additional Inherited Members | |
Public Types inherited from open3d::t::geometry::Geometry | |
| enum class | GeometryType { Unspecified = 0 , PointCloud = 1 , VoxelGrid = 2 , Octree = 3 , LineSet = 4 , MeshBase = 5 , TriangleMesh = 6 , HalfEdgeTriangleMesh = 7 , Image = 8 , RGBDImage = 9 , TetraMesh = 10 , OrientedBoundingBox = 11 , AxisAlignedBoundingBox = 12 , OrientedBoundingEllipsoid = 13 } |
| Specifies possible geometry types. More... | |
Protected Member Functions inherited from open3d::t::geometry::Geometry | |
| Geometry (GeometryType type, int dimension) | |
| Parameterized Constructor. More... | |
A bounding ellipsoid oriented along an arbitrary frame of reference.
| open3d::t::geometry::OrientedBoundingEllipsoid::OrientedBoundingEllipsoid | ( | const core::Device & | device = core::Device("CPU:0") | ) |
Construct an empty OrientedBoundingEllipsoid on the provided device.
| open3d::t::geometry::OrientedBoundingEllipsoid::OrientedBoundingEllipsoid | ( | const core::Tensor & | center, |
| const core::Tensor & | rotation, | ||
| const core::Tensor & | radii | ||
| ) |
Construct an OrientedBoundingEllipsoid from center, rotation and radii.
The OrientedBoundingEllipsoid will be created on the device of the given tensors, which must be on the same device and have the same data type.
| center | Center of the bounding ellipsoid. Tensor of shape {3,}, and type float32 or float64. |
| rotation | Rotation matrix of the bounding ellipsoid. Tensor of shape {3, 3}, and type float32 or float64. |
| radii | Radii of the bounding ellipsoid along the three principal axes. Tensor of shape {3,}, and type float32 or float64. |
|
inlineoverridevirtual |
|
overridevirtual |
Clear all elements in the geometry.
Implements open3d::t::geometry::Geometry.
|
inline |
Returns copy of the OrientedBoundingEllipsoid on the same device.
|
static |
Creates the oriented bounding ellipsoid with the smallest volume using Khachiyan's algorithm.
| points | A list of points with data type of float32 or float64 (N x 3 tensor, where N must be larger than 3). |
| robust | If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates. |
|
static |
Create an OrientedBoundingEllipsoid from a legacy Open3D oriented bounding ellipsoid.
| ellipsoid | Legacy OrientedBoundingEllipsoid. |
| dtype | The data type of the ellipsoid for center, radii and color. The default is float32. |
| device | The device of the ellipsoid. The default is CPU:0. |
| AxisAlignedBoundingBox open3d::t::geometry::OrientedBoundingEllipsoid::GetAxisAlignedBoundingBox | ( | ) | const |
Convert to an axis-aligned box.
|
inline |
|
inline |
|
inlineoverridevirtual |
Returns the device attribute of this OrientedBoundingEllipsoid.
Implements open3d::t::geometry::Geometry.
|
inline |
Returns the data type attribute of this OrientedBoundingEllipsoid.
| core::Tensor open3d::t::geometry::OrientedBoundingEllipsoid::GetEllipsoidPoints | ( | ) | const |
Returns the six critical points of the bounding ellipsoid.
The Return tensor has shape {6, 3} and data type same as the ellipsoid.
* ------- x * /| * / | * / | z * y * 2 * .--|---. * .--' | '--. * .--' | '--. * .' | 4 '. * / | / \ * / | / \ * 0 |------------------|-------------------| 1 * \ / | / * \ / | / * '. 5 | .' * '--. | .--' * '--. | .--' * '--|---' * 3 *
| core::Tensor open3d::t::geometry::OrientedBoundingEllipsoid::GetMaxBound | ( | ) | const |
| core::Tensor open3d::t::geometry::OrientedBoundingEllipsoid::GetMinBound | ( | ) | const |
| OrientedBoundingBox open3d::t::geometry::OrientedBoundingEllipsoid::GetMinimalOrientedBoundingBox | ( | bool | robust = false | ) | const |
Returns the minimal oriented bounding box around the ellipsoid.
| OrientedBoundingBox open3d::t::geometry::OrientedBoundingEllipsoid::GetOrientedBoundingBox | ( | bool | robust = false | ) | const |
Returns an oriented bounding box around the ellipsoid.
| core::Tensor open3d::t::geometry::OrientedBoundingEllipsoid::GetPointIndicesWithinBoundingEllipsoid | ( | const core::Tensor & | points | ) | const |
Indices to points that are within the bounding ellipsoid.
| points | Tensor with {N, 3} shape, and type float32 or float64. |
|
inline |
|
inline |
|
inlineoverridevirtual |
Returns true iff the geometry is empty.
Implements open3d::t::geometry::Geometry.
| OrientedBoundingEllipsoid & open3d::t::geometry::OrientedBoundingEllipsoid::Rotate | ( | const core::Tensor & | rotation, |
| const std::optional< core::Tensor > & | center = std::nullopt |
||
| ) |
Rotate the oriented ellipsoid by the given rotation matrix. If the rotation matrix is not orthogonal, the rotation will not be applied. The rotation center will be the ellipsoid center if it is not specified.
| rotation | Rotation matrix of shape {3, 3}, type float32 or float64, device same as the ellipsoid. |
| center | Center of the rotation, default is null, which means use center of the ellipsoid as rotation center. |
| OrientedBoundingEllipsoid & open3d::t::geometry::OrientedBoundingEllipsoid::Scale | ( | double | scale, |
| const std::optional< core::Tensor > & | center = std::nullopt |
||
| ) |
Scale the oriented ellipsoid. The scaling center will be the ellipsoid center if it is not specified.
| scale | The scale parameter. |
| center | Center used for the scaling operation. Tensor of shape {3,}, type float32 or float64, device same as the ellipsoid. |
| void open3d::t::geometry::OrientedBoundingEllipsoid::SetCenter | ( | const core::Tensor & | center | ) |
Set the center of the ellipsoid. If the data type of the given tensor differs from the data type of the ellipsoid, an exception will be thrown.
| center | Tensor with {3,} shape, and type float32 or float64. |
| void open3d::t::geometry::OrientedBoundingEllipsoid::SetColor | ( | const core::Tensor & | color | ) |
Set the color of the ellipsoid.
| color | Tensor with {3,} shape, and type float32 or float64, with values in range [0.0, 1.0]. |
| void open3d::t::geometry::OrientedBoundingEllipsoid::SetRadii | ( | const core::Tensor & | radii | ) |
Set the radii of the ellipsoid. If the data type of the given tensor differs from the data type of the ellipsoid, an exception will be thrown.
| radii | Tensor with {3,} shape, and type float32 or float64. |
| void open3d::t::geometry::OrientedBoundingEllipsoid::SetRotation | ( | const core::Tensor & | rotation | ) |
Set the rotation matrix of the ellipsoid. If the data type of the given tensor differs from the data type of the ellipsoid, an exception will be thrown.
| rotation | Tensor with {3, 3} shape, and type float32 or float64. |
| OrientedBoundingEllipsoid open3d::t::geometry::OrientedBoundingEllipsoid::To | ( | const core::Device & | device, |
| const core::Dtype & | dtype, | ||
| bool | copy = false |
||
| ) | const |
Transfer the OrientedBoundingEllipsoid to a specified device and dtype.
| device | The targeted device to convert to. |
| dtype | The targeted data type (Float32 or Float64). |
| copy | If true, a new OrientedBoundingEllipsoid is always created; if false, the copy is avoided when the original OrientedBoundingEllipsoid is already on the targeted device and dtype. |
| open3d::geometry::OrientedBoundingEllipsoid open3d::t::geometry::OrientedBoundingEllipsoid::ToLegacy | ( | ) | const |
Convert to a legacy Open3D oriented bounding ellipsoid.
| std::string open3d::t::geometry::OrientedBoundingEllipsoid::ToString | ( | ) | const |
Text description.
| OrientedBoundingEllipsoid & open3d::t::geometry::OrientedBoundingEllipsoid::Translate | ( | const core::Tensor & | translation, |
| bool | relative = true |
||
| ) |
Translate the oriented ellipsoid by the given translation. If relative is true, the translation is added to the center of the ellipsoid. If false, the center will be assigned to the translation.
| translation | Translation tensor of shape {3,}, type float32 or float64, device same as the ellipsoid. |
| relative | Whether to perform relative translation. |
| double open3d::t::geometry::OrientedBoundingEllipsoid::Volume | ( | ) | const |
Returns the volume of the bounding ellipsoid.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |