![]() |
SCENE C++ API
2.1.2
|
Interface for the import of unstructured point cloud data. More...
#include <lsimport.h>
Public Member Functions | |
virtual bool | getNextPoint (double position[3], uint32_t &row, uint32_t &column, float normal[3], uint8_t color[3], float &intensity)=0 |
Must return the next point each time it is called. More... | |
virtual uint64_t | getNumberOfPoints () const =0 |
Must return the exact overall number of points. More... | |
virtual bool | isStructured () const |
Must return true if the scan data is ordered in rows and columns. More... | |
virtual uint32_t | getNumberOfRows () const |
Must return the exact number of rows. More... | |
virtual uint32_t | getNumberOfCols () const |
Must return the exact number of cols. More... | |
virtual bool | hasNormals () const |
Return true if all the points have valid normals. More... | |
virtual bool | hasColors () const |
Return true if all the points are colored. More... | |
virtual bool | hasIntensity () const |
Return true if all the points have intensity values. More... | |
Additional Inherited Members | |
![]() | |
void | ref () const |
Increments the internal reference counter. More... | |
void | unref () const |
Decrements the internal reference counter. More... | |
Interface for the import of unstructured point cloud data.
You have to inherit and implement this interface to be able to call the function importPointData() successfully.
|
pure virtual |
Must return the next point each time it is called.
This will be called once for every point in the data set. Each time this method is called, it should return the data of the next point. The order of the points is not important. If you provide structured data, the order and position in the 2D grid is determined by the supplied row and column values. If you supply the same row/col combination twice, the first value will be overwritten! Return true if everything is okay, return false to signal an error and abort the import. In this case importPointData() will return asap with an InvalidRequest error. All parameters are output parameters!
position | Position of the scan point. Pointer to three values (X, Y, Z). |
row | Row number, starting at zero. Pointer to one value. Will be ignored if isStructured() returned false. |
column | Column number, starting at zero. Pointer to one value. Will be ignored if isStructured() returned false. |
normal | Normal of the scan point. Pointer to three values (X, Y, Z). Will be ignored if hasNormals() returned false. |
color | Color of the scan point. Pointer to three R, G, B bytes. Will be ignored if hasColors() returned false. |
intensity | Intensity of the scan point. Pointer to one value. The valid range is between 0 and 1, so you may have to convert or scale your intensity/reflection/gray values. Will be ignored if hasIntensity() returned false. |
|
pure virtual |
Must return the exact overall number of points.
This is only called once before the points are iterated!
|
inlinevirtual |
Must return true if the scan data is ordered in rows and columns.
Structured points are sorted into a 2D grid based on the supplied row and column values. The number of overall points must be <= rows * columns. You do not need to set all points, if you do not set a position, it will stay empty. Return false if you just want to import a unstructured point cloud. This is only called once before the points are iterated!
|
inlinevirtual |
Must return the exact number of rows.
The returned value must be greater 0 for structured data. It will be only called if isStructured() returns true. This is only called once before the points are iterated!
|
inlinevirtual |
Must return the exact number of cols.
The returned value must be greater 0 for structured data. It will be only called if isStructured() returns true. This is only called once before the points are iterated!
|
inlinevirtual |
Return true if all the points have valid normals.
It no normals are supplied, SCENE might estimate them later. Since this process is far from perfect and can take a very long time for big point clouds, you should always supply normals if they are available. Only all or no points can have normals! This is only called once before the points are iterated!
|
inlinevirtual |
Return true if all the points are colored.
Partially colored data sets are not supported. Keep in mind that only color OR intensity is supported! This is only called once before the points are iterated!
|
inlinevirtual |
Return true if all the points have intensity values.
Only all or no points can have an intensity value! Keep in mind that only color OR intensity is supported! This is only called once before the points are iterated!