Open3D (C++ API)
0.18.0
|
The base geometry class for 3D geometries. More...
#include <Geometry3D.h>
Public Member Functions | |
~Geometry3D () override | |
Geometry3D & | Clear () 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 Geometry3D & | Transform (const Eigen::Matrix4d &transformation)=0 |
Apply transformation (4x4 matrix) to the geometry coordinates. More... | |
virtual Geometry3D & | Translate (const Eigen::Vector3d &translation, bool relative=true)=0 |
Apply translation to the geometry coordinates. More... | |
virtual Geometry3D & | Scale (const double scale, const Eigen::Vector3d ¢er)=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 Geometry3D & | Rotate (const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er)=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 Geometry3D & | Rotate (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 ¢er) 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 ¢er) 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... | |
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 } |
Specifies possible geometry types. More... | |
The base geometry class for 3D geometries.
Main class for 3D geometries, Derives all data from Geometry Base class.
|
inlineoverride |
|
inlineprotected |
Parameterized Constructor.
type | type of object based on GeometryType. |
|
overridepure virtual |
Clear all elements in the geometry.
Implements open3d::geometry::Geometry.
Implemented in open3d::visualization::PointCloudPicker, open3d::geometry::VoxelGrid, open3d::geometry::TriangleMesh, open3d::geometry::TetraMesh, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::HalfEdgeTriangleMesh, open3d::geometry::AxisAlignedBoundingBox, and open3d::geometry::OrientedBoundingBox.
|
protected |
Computer center of a list of points.
|
protected |
Compute max bound of a list points.
|
protected |
Compute min bound of a list points.
|
pure virtual |
Creates the axis-aligned bounding box around the points of the object. Further details in AxisAlignedBoundingBox::CreateFromPoints()
Implemented in open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::OrientedBoundingBox, and open3d::visualization::PointCloudPicker.
|
pure virtual |
Returns the center of the geometry coordinates.
Implemented in open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::OrientedBoundingBox, and open3d::visualization::PointCloudPicker.
|
pure virtual |
Returns max bounds for geometry coordinates.
Implemented in open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::OrientedBoundingBox, and open3d::visualization::PointCloudPicker.
|
pure virtual |
Returns min bounds for geometry coordinates.
Implemented in open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::OrientedBoundingBox, and open3d::visualization::PointCloudPicker.
|
pure virtual |
Creates the minimal oriented bounding box around the points of the object. Further details in OrientedBoundingBox::CreateFromPointsMinimal()
robust | If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates. |
Implemented in open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, open3d::visualization::PointCloudPicker, and open3d::geometry::OrientedBoundingBox.
|
pure virtual |
Creates an oriented bounding box around the points of the object. Further details in OrientedBoundingBox::CreateFromPoints()
robust | If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates. |
Implemented in open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, open3d::visualization::PointCloudPicker, and open3d::geometry::OrientedBoundingBox.
|
static |
Get Rotation Matrix from AxisAngle RotationType.
|
static |
Get Rotation Matrix from Quaternion.
|
static |
Get Rotation Matrix from XYZ RotationType.
|
static |
Get Rotation Matrix from XZY RotationType.
|
static |
Get Rotation Matrix from YXZ RotationType.
|
static |
Get Rotation Matrix from YZX RotationType.
|
static |
Get Rotation Matrix from ZXY RotationType.
|
static |
Get Rotation Matrix from ZYX RotationType.
|
overridepure virtual |
Returns true
iff the geometry is empty.
Implements open3d::geometry::Geometry.
Implemented in open3d::visualization::PointCloudPicker, open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, and open3d::geometry::OrientedBoundingBox.
|
protected |
Resizes the colors vector and paints a uniform color.
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. |
|
virtual |
|
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\).
R | A 3x3 rotation matrix |
center | Rotation center that is used for the rotation. |
Implemented in open3d::visualization::PointCloudPicker, open3d::geometry::VoxelGrid, open3d::geometry::TriangleMesh, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, and open3d::geometry::OrientedBoundingBox.
|
protected |
Rotate all covariance matrices with the rotation matrix R
.
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
|
protected |
Rotate all normals with the rotation matrix R
.
R | A 3x3 rotation matrix |
normals | A list of normals to be transformed. |
|
protected |
Rotate all points with the rotation matrix R
.
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. |
|
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\).
scale | The scale parameter that is multiplied to the points/vertices of the geometry. |
center | Scale center that is used to resize the geometry. |
Implemented in open3d::visualization::PointCloudPicker, open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, and open3d::geometry::OrientedBoundingBox.
|
protected |
Scale the coordinates of all points by the scaling factor scale
.
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.. |
|
pure virtual |
Apply transformation (4x4 matrix) to the geometry coordinates.
Implemented in open3d::visualization::PointCloudPicker, open3d::geometry::VoxelGrid, open3d::geometry::TriangleMesh, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, and open3d::geometry::OrientedBoundingBox.
|
protected |
Transforms all covariance matrices with the transformation.
transformation | 4x4 matrix for transformation. |
covariances | A list of covariance matrices to be transformed. |
|
protected |
Transforms the normals with the transformation matrix.
transformation | 4x4 matrix for transformation. |
normals | A list of normals to be transformed. |
|
protected |
Transforms all points with the transformation matrix.
transformation | 4x4 matrix for transformation. |
points | A list of points to be transformed. |
|
pure virtual |
Apply translation to the geometry coordinates.
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 . |
Implemented in open3d::visualization::PointCloudPicker, open3d::geometry::VoxelGrid, open3d::geometry::PointCloud, open3d::geometry::Octree, open3d::geometry::MeshBase, open3d::geometry::LineSet, open3d::geometry::AxisAlignedBoundingBox, and open3d::geometry::OrientedBoundingBox.
|
protected |
Apply translation to the geometry coordinates.
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 . |