Open3D (C++ API)  0.11.0
Public Member Functions | Static Public Member Functions | Protected Member Functions
open3d::geometry::Geometry3D Class Referenceabstract

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

#include <Geometry3D.h>

Inheritance diagram for open3d::geometry::Geometry3D:
open3d::geometry::Geometry open3d::geometry::AxisAlignedBoundingBox open3d::geometry::LineSet open3d::geometry::MeshBase open3d::geometry::Octree open3d::geometry::OrientedBoundingBox open3d::geometry::PointCloud open3d::geometry::VoxelGrid open3d::visualization::PointCloudPicker

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
 Returns an axis-aligned bounding box of the geometry. More...
 
virtual OrientedBoundingBox GetOrientedBoundingBox () const =0
 Returns an oriented bounding box of the geometry. More...
 
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 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...
 
- Protected Member Functions inherited from open3d::geometry::Geometry
 Geometry (GeometryType type, int dimension)
 Parameterized Constructor. More...
 

Additional Inherited Members

- Public Types inherited from open3d::geometry::Geometry
enum  GeometryType {
  GeometryType::Unspecified = 0, GeometryType::PointCloud = 1, GeometryType::VoxelGrid = 2, GeometryType::Octree = 3,
  GeometryType::LineSet = 4, GeometryType::MeshBase = 5, GeometryType::TriangleMesh = 6, GeometryType::HalfEdgeTriangleMesh = 7,
  GeometryType::Image = 8, GeometryType::RGBDImage = 9, GeometryType::TetraMesh = 10, GeometryType::OrientedBoundingBox = 11,
  GeometryType::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.

Constructor & Destructor Documentation

◆ ~Geometry3D()

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

◆ Geometry3D()

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

Parameterized Constructor.

Parameters
typetype of object based on GeometryType.

Member Function Documentation

◆ 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

◆ GetCenter()

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

◆ GetMaxBound()

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

◆ GetMinBound()

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

◆ GetOrientedBoundingBox()

virtual OrientedBoundingBox open3d::geometry::Geometry3D::GetOrientedBoundingBox ( ) const
pure virtual

◆ 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

◆ 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
colorsAn array of eigen vectors specifies colors in RGB.
sizeThe resultant size of the colors array.
colorThe final color in which the colors will be painted.

◆ Rotate() [1/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
RA 3x3 rotation matrix
centerRotation center that is used for the rotation.

Implemented in open3d::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::PointCloud, open3d::geometry::LineSet, open3d::geometry::TriangleMesh, and open3d::visualization::PointCloudPicker.

◆ Rotate() [2/2]

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

◆ 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
RA 3x3 rotation matrix
normalsA 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
RA 3x3 rotation matrix defines the axis of rotation and the norm the angle around this axis.
pointsA list of points to be transformed.
centerRotation 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
scaleThe scale parameter that is multiplied to the points/vertices of the geometry.
centerScale center that is used to resize the geometry.

Implemented in open3d::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::LineSet, open3d::geometry::PointCloud, and open3d::visualization::PointCloudPicker.

◆ 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
scaleThe scale factor that is used to resize the geometry
pointsA list of points to be transformed
centerScale center that is used to resize the geometry..

◆ Transform()

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

◆ 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
transformation4x4 matrix for transformation.
normalsA 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
transformation4x4 matrix for transformation.
pointsA 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
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.

Implemented in open3d::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::LineSet, open3d::geometry::PointCloud, and open3d::visualization::PointCloudPicker.

◆ 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
translationA 3D vector to transform the geometry.
pointsA list of points to be transformed.
relativeIf 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: