A simple point cloud data structure. Points may be ordered or not. An ordered set is kept as a single array in row major order and with a width and a height. An unordered array must have height==1 and width equal to the number of points.
More...
#include <PointCloud.hpp>
Inherits GeometryData.
|
typedef rw::core::Ptr< PointCloud > | Ptr |
| smart pointer type to this class
|
|
typedef rw::math::Vector3D< float > | point_type |
| type of point used internally in pointcloud
|
|
enum | GeometryType {
PointCloud
, LineMesh
, PlainTriMesh
, IdxTriMesh
,
SpherePrim
, BoxPrim
, OBBPrim
, AABBPrim
,
LinePrim
, PointPrim
, PyramidPrim
, ConePrim
,
TrianglePrim
, CylinderPrim
, TubePrim
, PlanePrim
,
RayPrim
, Implicit
, Quadratic
, UserType
} |
| geometry data types
|
|
typedef rw::core::Ptr< GeometryData > | Ptr |
| smart pointer type to this class
|
|
typedef rw::core::Ptr< const GeometryData > | CPtr |
| const smart pointer type to this class
|
|
A simple point cloud data structure. Points may be ordered or not. An ordered set is kept as a single array in row major order and with a width and a height. An unordered array must have height==1 and width equal to the number of points.
◆ PointCloud()
◆ getData() [1/2]
returns a char pointer to the image data
- Returns
- char pointer to the image data
◆ getData() [2/2]
returns a char pointer to the image data
- Returns
- const char pointer to the image data
◆ getHeight()
◆ getTriMesh() [1/2]
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means ownership is transfered to the caller. Specifying forceCopy to false will enable copy by reference and ownership is not necesarilly transfered. This is more efficient, though pointer is only alive as long as this GeometryData is alive.
- Returns
- TriMesh representation of this GeometryData
Implements GeometryData.
◆ getTriMesh() [2/2]
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means ownership is transfered to the caller. Specifying forceCopy to false will enable copy by reference and ownership is not necesarilly transfered. This is more efficient, though pointer is only alive as long as this GeometryData is alive.
- Returns
- TriMesh representation of this GeometryData
◆ getType()
◆ getWidth()
width of the point cloud data. If the data is unordered then this will be equal to the number of points.
- Returns
- width of data points
◆ loadPCD()
load point cloud from PCD file
- Parameters
-
filename | [in] name of PCD file |
- Returns
- a point cloud
◆ operator()() [1/2]
access points in point cloud.
- Parameters
-
x | [in] x coordinate, must be in [0;width[ |
y | [in] y coordinate, must be in [0;height[ |
- Returns
- point
◆ operator()() [2/2]
access points in point cloud.
- Parameters
-
x | [in] x coordinate, must be in [0;width[ |
y | [in] y coordinate, must be in [0;height[ |
- Returns
- point
◆ resize()
void resize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inline |
set width of point cloud. Data elements are accessed as [x+y*width].
If the current data array cannot contain the elements then it will be resized to be able to it.
- Parameters
-
w | [in] new width |
h | [in] new height |
◆ savePCD()
save point cloud in PCD file format (PCL library format)
- Parameters
-
cloud | [in] the point cloud to save |
filename | [in] the name of the file to save to |
t3d | [in] the transformation of the point cloud |
The documentation for this class was generated from the following file: