Open3D (C++ API)  0.18.0+85981ff
open3d::geometry::Geometry3D Class Referenceabstract

The base geometry class for 3D geometries. More...

#include <Geometry3D.h>

Inheritance diagram for open3d::geometry::Geometry3D:

Public Member Functions

~Geometry3D () override

Geometry3DClear () override=0
Clear all elements in the geometry. More...

bool IsEmpty () const override=0
Returns true iff the geometry is empty. More...

virtual Eigen::Vector3d GetMinBound () const =0
Returns min bounds for geometry coordinates. More...

virtual Eigen::Vector3d GetMaxBound () const =0
Returns max bounds for geometry coordinates. More...

virtual Eigen::Vector3d GetCenter () const =0
Returns the center of the geometry coordinates. More...

virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox () const =0

virtual OrientedBoundingBox GetOrientedBoundingBox (bool robust=false) const =0

virtual OrientedBoundingBox GetMinimalOrientedBoundingBox (bool robust=false) const =0

virtual Geometry3DTransform (const Eigen::Matrix4d &transformation)=0
Apply transformation (4x4 matrix) to the geometry coordinates. More...

virtual Geometry3DTranslate (const Eigen::Vector3d &translation, bool relative=true)=0
Apply translation to the geometry coordinates. More...

virtual Geometry3DScale (const double scale, const Eigen::Vector3d &center)=0
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 Geometry3DRotate (const Eigen::Matrix3d &R, const Eigen::Vector3d &center)=0
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...

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 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...

Protected Member Functions

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...

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
}
Specifies possible geometry types. More...

Detailed Description

The base geometry class for 3D geometries.

Main class for 3D geometries, Derives all data from Geometry Base class.

◆ ~Geometry3D()

 open3d::geometry::Geometry3D::~Geometry3D ( )
inlineoverride

◆ Geometry3D()

 open3d::geometry::Geometry3D::Geometry3D ( GeometryType type )
inlineprotected

Parameterized Constructor.

Parameters
 type type of object based on GeometryType.

◆ Clear()

 Geometry3D& open3d::geometry::Geometry3D::Clear ( )
overridepure virtual

◆ ComputeCenter()

 Eigen::Vector3d open3d::geometry::Geometry3D::ComputeCenter ( const std::vector< Eigen::Vector3d > & points ) const
protected

Computer center of a list of points.

◆ ComputeMaxBound()

 Eigen::Vector3d open3d::geometry::Geometry3D::ComputeMaxBound ( const std::vector< Eigen::Vector3d > & points ) const
protected

Compute max bound of a list points.

◆ ComputeMinBound()

 Eigen::Vector3d open3d::geometry::Geometry3D::ComputeMinBound ( const std::vector< Eigen::Vector3d > & points ) const
protected

Compute min bound of a list points.

◆ GetAxisAlignedBoundingBox()

 virtual AxisAlignedBoundingBox open3d::geometry::Geometry3D::GetAxisAlignedBoundingBox ( ) const
pure virtual

Creates the axis-aligned bounding box around the points of the object. Further details in AxisAlignedBoundingBox::CreateFromPoints()

◆ GetCenter()

 virtual Eigen::Vector3d open3d::geometry::Geometry3D::GetCenter ( ) const
pure virtual

Returns the center of the geometry coordinates.

◆ GetMaxBound()

 virtual Eigen::Vector3d open3d::geometry::Geometry3D::GetMaxBound ( ) const
pure virtual

Returns max bounds for geometry coordinates.

◆ GetMinBound()

 virtual Eigen::Vector3d open3d::geometry::Geometry3D::GetMinBound ( ) const
pure virtual

Returns min bounds for geometry coordinates.

◆ GetMinimalOrientedBoundingBox()

 virtual OrientedBoundingBox open3d::geometry::Geometry3D::GetMinimalOrientedBoundingBox ( bool robust = false ) const
pure virtual

Creates the minimal oriented bounding box around the points of the object. Further details in OrientedBoundingBox::CreateFromPointsMinimal()

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

◆ GetOrientedBoundingBox()

 virtual OrientedBoundingBox open3d::geometry::Geometry3D::GetOrientedBoundingBox ( bool robust = false ) const
pure virtual

Creates an oriented bounding box around the points of the object. Further details in OrientedBoundingBox::CreateFromPoints()

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

◆ GetRotationMatrixFromAxisAngle()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromAxisAngle ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from AxisAngle RotationType.

◆ GetRotationMatrixFromQuaternion()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromQuaternion ( const Eigen::Vector4d & rotation )
static

Get Rotation Matrix from Quaternion.

◆ GetRotationMatrixFromXYZ()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromXYZ ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from XYZ RotationType.

◆ GetRotationMatrixFromXZY()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromXZY ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from XZY RotationType.

◆ GetRotationMatrixFromYXZ()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromYXZ ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from YXZ RotationType.

◆ GetRotationMatrixFromYZX()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromYZX ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from YZX RotationType.

◆ GetRotationMatrixFromZXY()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromZXY ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from ZXY RotationType.

◆ GetRotationMatrixFromZYX()

 Eigen::Matrix3d open3d::geometry::Geometry3D::GetRotationMatrixFromZYX ( const Eigen::Vector3d & rotation )
static

Get Rotation Matrix from ZYX RotationType.

◆ IsEmpty()

 bool open3d::geometry::Geometry3D::IsEmpty ( ) const
overridepure virtual

Returns true iff the geometry is empty.

Implements open3d::geometry::Geometry.

◆ ResizeAndPaintUniformColor()

 void open3d::geometry::Geometry3D::ResizeAndPaintUniformColor ( std::vector< Eigen::Vector3d > & colors, const size_t size, const Eigen::Vector3d & color ) const
protected

Resizes the colors vector and paints a uniform color.

Parameters
 colors An array of eigen vectors specifies colors in RGB. size The resultant size of the colors array. color The final color in which the colors will be painted.

◆ Rotate() [1/2]

 Geometry3D & open3d::geometry::Geometry3D::Rotate ( const Eigen::Matrix3d & R )
virtual

◆ Rotate() [2/2]

 virtual Geometry3D& open3d::geometry::Geometry3D::Rotate ( const Eigen::Matrix3d & R, const Eigen::Vector3d & center )
pure virtual

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
 R A 3x3 rotation matrix center Rotation center that is used for the rotation.

◆ RotateCovariances()

 void open3d::geometry::Geometry3D::RotateCovariances ( const Eigen::Matrix3d & R, std::vector< Eigen::Matrix3d > & covariances ) const
protected

Rotate all covariance matrices with the rotation matrix R.

Parameters
 R A 3x3 rotation matrix covariances A list of covariance matrices to be transformed.

The only part that affects the covariance is the rotation part. For more information on variance propagation please visit: https://en.wikipedia.org/wiki/Propagation_of_uncertainty

◆ RotateNormals()

 void open3d::geometry::Geometry3D::RotateNormals ( const Eigen::Matrix3d & R, std::vector< Eigen::Vector3d > & normals ) const
protected

Rotate all normals with the rotation matrix R.

Parameters
 R A 3x3 rotation matrix normals A list of normals to be transformed.

◆ RotatePoints()

 void open3d::geometry::Geometry3D::RotatePoints ( const Eigen::Matrix3d & R, std::vector< Eigen::Vector3d > & points, const Eigen::Vector3d & center ) const
protected

Rotate all points with the rotation matrix R.

Parameters
 R A 3x3 rotation matrix defines the axis of rotation and the norm the angle around this axis. points A list of points to be transformed. center Rotation center that is used for the rotation.

◆ Scale()

 virtual Geometry3D& open3d::geometry::Geometry3D::Scale ( const double scale, const Eigen::Vector3d & center )
pure virtual

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
 scale The scale parameter that is multiplied to the points/vertices of the geometry. center Scale center that is used to resize the geometry.

◆ ScalePoints()

 void open3d::geometry::Geometry3D::ScalePoints ( const double scale, std::vector< Eigen::Vector3d > & points, const Eigen::Vector3d & center ) const
protected

Scale the coordinates of all points by the scaling factor scale.

Parameters
 scale The scale factor that is used to resize the geometry points A list of points to be transformed center Scale center that is used to resize the geometry..

◆ Transform()

 virtual Geometry3D& open3d::geometry::Geometry3D::Transform ( const Eigen::Matrix4d & transformation )
pure virtual

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

◆ TransformCovariances()

 void open3d::geometry::Geometry3D::TransformCovariances ( const Eigen::Matrix4d & transformation, std::vector< Eigen::Matrix3d > & covariances ) const
protected

Transforms all covariance matrices with the transformation.

Parameters
 transformation 4x4 matrix for transformation. covariances A list of covariance matrices to be transformed.

◆ TransformNormals()

 void open3d::geometry::Geometry3D::TransformNormals ( const Eigen::Matrix4d & transformation, std::vector< Eigen::Vector3d > & normals ) const
protected

Transforms the normals with the transformation matrix.

Parameters
 transformation 4x4 matrix for transformation. normals A list of normals to be transformed.

◆ TransformPoints()

 void open3d::geometry::Geometry3D::TransformPoints ( const Eigen::Matrix4d & transformation, std::vector< Eigen::Vector3d > & points ) const
protected

Transforms all points with the transformation matrix.

Parameters
 transformation 4x4 matrix for transformation. points A list of points to be transformed.

◆ Translate()

 virtual Geometry3D& open3d::geometry::Geometry3D::Translate ( const Eigen::Vector3d & translation, bool relative = true )
pure virtual

Apply translation to the geometry coordinates.

Parameters
 translation A 3D vector to transform the geometry. relative If true, the translation is directly applied to the geometry. Otherwise, the geometry center is moved to the translation.

◆ TranslatePoints()

 void open3d::geometry::Geometry3D::TranslatePoints ( const Eigen::Vector3d & translation, std::vector< Eigen::Vector3d > & points, bool relative ) const
protected

Apply translation to the geometry coordinates.

Parameters
 translation A 3D vector to transform the geometry. points A list of points to be transformed. relative If true, the translation is directly applied to the points. Otherwise, the center of the points is moved to the translation.

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