Open3D (C++ API)
0.11.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 |
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 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 , and center , a given point is transformed according to . 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 , and center , a given point is transformed according to . 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 | 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... | |
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... | |
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::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::HalfEdgeTriangleMesh, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::TriangleMesh, open3d::geometry::LineSet, open3d::geometry::PointCloud, open3d::geometry::TetraMesh, and open3d::visualization::PointCloudPicker.
|
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 |
Returns an axis-aligned bounding box of 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.
|
pure virtual |
Returns the center of the geometry coordinates.
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.
|
pure virtual |
Returns max bounds for geometry coordinates.
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.
|
pure virtual |
Returns min bounds for geometry coordinates.
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.
|
pure virtual |
Returns an oriented bounding box of 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.
|
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::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::LineSet, open3d::geometry::PointCloud, and open3d::visualization::PointCloudPicker.
|
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. |
|
pure virtual |
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center , a given point is transformed according to .
R | A 3x3 rotation matrix |
center | Rotation 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.
|
virtual |
|
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 , and center , a given point is transformed according to .
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::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::LineSet, open3d::geometry::PointCloud, and open3d::visualization::PointCloudPicker.
|
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::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::LineSet, open3d::geometry::PointCloud, open3d::geometry::TriangleMesh, and open3d::visualization::PointCloudPicker.
|
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::geometry::Octree, open3d::geometry::AxisAlignedBoundingBox, open3d::geometry::VoxelGrid, open3d::geometry::MeshBase, open3d::geometry::OrientedBoundingBox, open3d::geometry::LineSet, open3d::geometry::PointCloud, and open3d::visualization::PointCloudPicker.
|
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 . |