Open3D (C++ API)  0.19.0
Public Member Functions | Static Public Member Functions | Data Fields
open3d::geometry::OrientedBoundingEllipsoid Class Reference

#include <BoundingVolume.h>

Inheritance diagram for open3d::geometry::OrientedBoundingEllipsoid:
open3d::geometry::Geometry3D open3d::geometry::Geometry

Public Member Functions

 OrientedBoundingEllipsoid ()
 Default constructor. More...
 
 OrientedBoundingEllipsoid (const Eigen::Vector3d &center, const Eigen::Matrix3d &R, const Eigen::Vector3d &radii)
 Parameterized constructor. More...
 
 ~OrientedBoundingEllipsoid () override
 
OrientedBoundingEllipsoidClear () override
 Clear all elements in the geometry. More...
 
bool IsEmpty () const override
 Returns true iff the geometry is empty. More...
 
virtual Eigen::Vector3d GetMinBound () const override
 Returns min bounds for geometry coordinates. More...
 
virtual Eigen::Vector3d GetMaxBound () const override
 Returns max bounds for geometry coordinates. More...
 
virtual Eigen::Vector3d GetCenter () const override
 Returns the center of the geometry coordinates. More...
 
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox () const override
 Creates an axis-aligned bounding box around the object. More...
 
virtual OrientedBoundingBox GetOrientedBoundingBox (bool robust) const override
 Returns an oriented bounding box around the ellipsoid. More...
 
virtual OrientedBoundingBox GetMinimalOrientedBoundingBox (bool robust) const override
 Returns an oriented bounding box around the ellipsoid. More...
 
virtual OrientedBoundingEllipsoidTransform (const Eigen::Matrix4d &transformation) override
 Apply transformation (4x4 matrix) to the geometry coordinates. More...
 
virtual OrientedBoundingEllipsoidTranslate (const Eigen::Vector3d &translation, bool relative=true) override
 Apply translation to the geometry coordinates. More...
 
virtual OrientedBoundingEllipsoidScale (const double scale, const Eigen::Vector3d &center) override
 Apply scaling to the geometry coordinates. Given a scaling factor \(s\), and center \(c\), a given point \(p\) is transformed according to \(s (p - c) + c\). More...
 
virtual OrientedBoundingEllipsoidRotate (const Eigen::Matrix3d &R, const Eigen::Vector3d &center) override
 Apply rotation to the geometry coordinates and normals. Given a rotation matrix \(R\), and center \(c\), a given point \(p\) is transformed according to \(R (p - c) + c\). More...
 
double Volume () const
 Returns the volume of the bounding box. More...
 
std::vector< Eigen::Vector3d > GetEllipsoidPoints () const
 
std::vector< size_t > GetPointIndicesWithinBoundingEllipsoid (const std::vector< Eigen::Vector3d > &points) const
 Return indices to points that are within the bounding ellipsoid. More...
 
- Public Member Functions inherited from open3d::geometry::Geometry3D
 ~Geometry3D () override
 
virtual Geometry3DRotate (const Eigen::Matrix3d &R)
 
- Public Member Functions inherited from open3d::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)
 

Static Public Member Functions

static OrientedBoundingEllipsoid CreateFromPoints (const std::vector< Eigen::Vector3d > &points, bool robust=false)
 
- Static Public Member Functions inherited from open3d::geometry::Geometry3D
static Eigen::Matrix3d GetRotationMatrixFromXYZ (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from XYZ RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromYZX (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from YZX RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromZXY (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from ZXY RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromXZY (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from XZY RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromZYX (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from ZYX RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromYXZ (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from YXZ RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromAxisAngle (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from AxisAngle RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromQuaternion (const Eigen::Vector4d &rotation)
 Get Rotation Matrix from Quaternion. More...
 

Data Fields

Eigen::Vector3d center_
 The center point of the bounding ellipsoid. More...
 
Eigen::Matrix3d R_
 
Eigen::Vector3d radii_
 The radii of the bounding ellipsoid in its frame of reference. More...
 
Eigen::Vector3d color_
 The color of the bounding ellipsoid in RGB. More...
 

Additional Inherited Members

- Public Types inherited from open3d::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::geometry::Geometry3D
 Geometry3D (GeometryType type)
 Parameterized Constructor. More...
 
Eigen::Vector3d ComputeMinBound (const std::vector< Eigen::Vector3d > &points) const
 Compute min bound of a list points. More...
 
Eigen::Vector3d ComputeMaxBound (const std::vector< Eigen::Vector3d > &points) const
 Compute max bound of a list points. More...
 
Eigen::Vector3d ComputeCenter (const std::vector< Eigen::Vector3d > &points) const
 Computer center of a list of points. More...
 
void ResizeAndPaintUniformColor (std::vector< Eigen::Vector3d > &colors, const size_t size, const Eigen::Vector3d &color) const
 Resizes the colors vector and paints a uniform color. More...
 
void TransformPoints (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &points) const
 Transforms all points with the transformation matrix. More...
 
void TransformNormals (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &normals) const
 Transforms the normals with the transformation matrix. More...
 
void TransformCovariances (const Eigen::Matrix4d &transformation, std::vector< Eigen::Matrix3d > &covariances) const
 Transforms all covariance matrices with the transformation. More...
 
void TranslatePoints (const Eigen::Vector3d &translation, std::vector< Eigen::Vector3d > &points, bool relative) const
 Apply translation to the geometry coordinates. More...
 
void ScalePoints (const double scale, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d &center) const
 Scale the coordinates of all points by the scaling factor scale. More...
 
void RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d &center) const
 Rotate all points with the rotation matrix R. More...
 
void RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals) const
 Rotate all normals with the rotation matrix R. More...
 
void RotateCovariances (const Eigen::Matrix3d &R, std::vector< Eigen::Matrix3d > &covariances) const
 Rotate all covariance matrices with the rotation matrix R. More...
 
- Protected Member Functions inherited from open3d::geometry::Geometry
 Geometry (GeometryType type, int dimension)
 Parameterized Constructor. More...
 

Constructor & Destructor Documentation

◆ OrientedBoundingEllipsoid() [1/2]

open3d::geometry::OrientedBoundingEllipsoid::OrientedBoundingEllipsoid ( )
inline

Default constructor.

Creates an empty Oriented Bounding Ellipsoid.

◆ OrientedBoundingEllipsoid() [2/2]

open3d::geometry::OrientedBoundingEllipsoid::OrientedBoundingEllipsoid ( const Eigen::Vector3d &  center,
const Eigen::Matrix3d &  R,
const Eigen::Vector3d &  radii 
)
inline

Parameterized constructor.

Parameters
centerSpecifies the center position of the bounding ellipsoid.
RThe rotation matrix specifying the orientation of the bounding ellipsoid with the original frame of reference.
radiiThe radii of the bounding ellipsoid.

◆ ~OrientedBoundingEllipsoid()

open3d::geometry::OrientedBoundingEllipsoid::~OrientedBoundingEllipsoid ( )
inlineoverride

Member Function Documentation

◆ Clear()

OrientedBoundingEllipsoid & open3d::geometry::OrientedBoundingEllipsoid::Clear ( )
overridevirtual

Clear all elements in the geometry.

Implements open3d::geometry::Geometry3D.

◆ CreateFromPoints()

OrientedBoundingEllipsoid open3d::geometry::OrientedBoundingEllipsoid::CreateFromPoints ( const std::vector< Eigen::Vector3d > &  points,
bool  robust = false 
)
static

Creates an oriented bounding ellipsoid using a PCA. Note, that this is only an approximation to the minimum oriented bounding box that could be computed for example with O'Rourke's algorithm (cf. http://cs.smith.edu/~jorourke/Papers/MinVolBox.pdf, https://www.geometrictools.com/Documentation/MinimumVolumeBox.pdf)

Parameters
pointsThe input points
robustIf set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

◆ GetAxisAlignedBoundingBox()

AxisAlignedBoundingBox open3d::geometry::OrientedBoundingEllipsoid::GetAxisAlignedBoundingBox ( ) const
overridevirtual

Creates an axis-aligned bounding box around the object.

Implements open3d::geometry::Geometry3D.

◆ GetCenter()

Eigen::Vector3d open3d::geometry::OrientedBoundingEllipsoid::GetCenter ( ) const
overridevirtual

Returns the center of the geometry coordinates.

Implements open3d::geometry::Geometry3D.

◆ GetEllipsoidPoints()

std::vector< Eigen::Vector3d > open3d::geometry::OrientedBoundingEllipsoid::GetEllipsoidPoints ( ) const

Returns the six critical points of the bounding ellipsoid.

*      ------- x
*     /|
*    / |
*   /  | z
*  y
*                            2
*                         .--|---.
*                    .--'    |     '--.
*               .--'         |          '--.
*            .'              |   4           '.
*           /                |  /              \
*          /                 | /                \
*       0 |------------------|-------------------| 1
*          \               / |                  /
*           \             /  |                 /
*            '.         5    |               .'
*               '--.         |          .--'
*                    '--.    |     .--'
*                         '--|---'
*                            3
* 

◆ GetMaxBound()

Eigen::Vector3d open3d::geometry::OrientedBoundingEllipsoid::GetMaxBound ( ) const
overridevirtual

Returns max bounds for geometry coordinates.

Implements open3d::geometry::Geometry3D.

◆ GetMinBound()

Eigen::Vector3d open3d::geometry::OrientedBoundingEllipsoid::GetMinBound ( ) const
overridevirtual

Returns min bounds for geometry coordinates.

Implements open3d::geometry::Geometry3D.

◆ GetMinimalOrientedBoundingBox()

OrientedBoundingBox open3d::geometry::OrientedBoundingEllipsoid::GetMinimalOrientedBoundingBox ( bool  robust) const
overridevirtual

Returns an oriented bounding box around the ellipsoid.

Implements open3d::geometry::Geometry3D.

◆ GetOrientedBoundingBox()

OrientedBoundingBox open3d::geometry::OrientedBoundingEllipsoid::GetOrientedBoundingBox ( bool  robust) const
overridevirtual

Returns an oriented bounding box around the ellipsoid.

Implements open3d::geometry::Geometry3D.

◆ GetPointIndicesWithinBoundingEllipsoid()

std::vector<size_t> open3d::geometry::OrientedBoundingEllipsoid::GetPointIndicesWithinBoundingEllipsoid ( const std::vector< Eigen::Vector3d > &  points) const

Return indices to points that are within the bounding ellipsoid.

◆ IsEmpty()

bool open3d::geometry::OrientedBoundingEllipsoid::IsEmpty ( ) const
overridevirtual

Returns true iff the geometry is empty.

Implements open3d::geometry::Geometry3D.

◆ Rotate()

OrientedBoundingEllipsoid & open3d::geometry::OrientedBoundingEllipsoid::Rotate ( const Eigen::Matrix3d &  R,
const Eigen::Vector3d &  center 
)
overridevirtual

Apply rotation to the geometry coordinates and normals. Given a rotation matrix \(R\), and center \(c\), a given point \(p\) is transformed according to \(R (p - c) + c\).

Parameters
RA 3x3 rotation matrix
centerRotation center that is used for the rotation.

Implements open3d::geometry::Geometry3D.

◆ Scale()

OrientedBoundingEllipsoid & open3d::geometry::OrientedBoundingEllipsoid::Scale ( const double  scale,
const Eigen::Vector3d &  center 
)
overridevirtual

Apply scaling to the geometry coordinates. Given a scaling factor \(s\), and center \(c\), a given point \(p\) is transformed according to \(s (p - c) + c\).

Parameters
scaleThe scale parameter that is multiplied to the points/vertices of the geometry.
centerScale center that is used to resize the geometry.

Implements open3d::geometry::Geometry3D.

◆ Transform()

OrientedBoundingEllipsoid & open3d::geometry::OrientedBoundingEllipsoid::Transform ( const Eigen::Matrix4d &  transformation)
overridevirtual

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

Implements open3d::geometry::Geometry3D.

◆ Translate()

OrientedBoundingEllipsoid & open3d::geometry::OrientedBoundingEllipsoid::Translate ( const Eigen::Vector3d &  translation,
bool  relative = true 
)
overridevirtual

Apply translation to the geometry coordinates.

Parameters
translationA 3D vector to transform the geometry.
relativeIf true, the translation is directly applied to the geometry. Otherwise, the geometry center is moved to the translation.

Implements open3d::geometry::Geometry3D.

◆ Volume()

double open3d::geometry::OrientedBoundingEllipsoid::Volume ( ) const

Returns the volume of the bounding box.

Field Documentation

◆ center_

Eigen::Vector3d open3d::geometry::OrientedBoundingEllipsoid::center_

The center point of the bounding ellipsoid.

◆ color_

Eigen::Vector3d open3d::geometry::OrientedBoundingEllipsoid::color_

The color of the bounding ellipsoid in RGB.

◆ R_

Eigen::Matrix3d open3d::geometry::OrientedBoundingEllipsoid::R_

The rotation matrix of the bounding ellipsoid to transform the original frame of reference to the frame of this ellipsoid.

◆ radii_

Eigen::Vector3d open3d::geometry::OrientedBoundingEllipsoid::radii_

The radii of the bounding ellipsoid in its frame of reference.


The documentation for this class was generated from the following files: