CCCoreLib 31 May 2022
CloudCompare Core algorithms
|
A generic 3D point cloud interface for data communication between library and client applications. More...
#include <GenericCloud.h>
Public Types | |
using | genericPointAction = std::function< void(const CCVector3 &, ScalarType &)> |
Generic function applied to a point (used by foreach) | |
Public Member Functions | |
GenericCloud ()=default | |
Default constructor. | |
virtual | ~GenericCloud ()=default |
Default destructor. | |
virtual unsigned | size () const =0 |
Returns the number of points. More... | |
virtual void | forEach (genericPointAction action)=0 |
Fast iteration mechanism. More... | |
virtual void | getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax)=0 |
Returns the cloud bounding box. More... | |
virtual unsigned char | testVisibility (const CCVector3 &P) const |
Returns a given point visibility state (relatively to a sensor for instance) More... | |
virtual void | placeIteratorAtBeginning ()=0 |
Sets the cloud iterator at the beginning. More... | |
virtual const CCVector3 * | getNextPoint ()=0 |
Returns the next point (relatively to the global iterator position) More... | |
virtual bool | enableScalarField ()=0 |
Enables the scalar field associated to the cloud. More... | |
virtual bool | isScalarFieldEnabled () const =0 |
Returns true if the scalar field is enabled, false otherwise. More... | |
virtual void | setPointScalarValue (unsigned pointIndex, ScalarType value)=0 |
Sets the ith point associated scalar value. More... | |
virtual ScalarType | getPointScalarValue (unsigned pointIndex) const =0 |
Returns the ith point associated scalar value. More... | |
A generic 3D point cloud interface for data communication between library and client applications.
|
pure virtual |
Enables the scalar field associated to the cloud.
If the scalar field structure is not yet initialized/allocated, this method gives the signal for its creation. Otherwise, if possible the structure size should be pre-reserved with the same number of elements as the point cloud.
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Fast iteration mechanism.
Virtual method to apply a function to the whole cloud
action | the function to apply (see GenericCloud::genericPointAction) |
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Returns the cloud bounding box.
Virtual method to request the cloud bounding box limits
bbMin | lower bounding-box limits (Xmin,Ymin,Zmin) |
bbMax | higher bounding-box limits (Xmax,Ymax,Zmax) |
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Returns the next point (relatively to the global iterator position)
Virtual method to handle the cloud global iterator. Global iterator position should be increased by one each time this method is called. Warning:
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Returns the ith point associated scalar value.
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Returns true if the scalar field is enabled, false otherwise.
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Sets the cloud iterator at the beginning.
Virtual method to handle the cloud global iterator
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Sets the ith point associated scalar value.
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
pure virtual |
Returns the number of points.
Virtual method to request the cloud size
Implemented in CCCoreLib::DgmOctreeReferenceCloud, and CCCoreLib::ReferenceCloud.
|
inlinevirtual |
Returns a given point visibility state (relatively to a sensor for instance)
Generic method to request a point visibility (should be overloaded if this functionality is required). The point visibility is such as defined in Daniel Girardeau-Montaut's PhD manuscript (see Chapter 2, section 2-3-3). In this case, a ground based laser sensor model should be used to determine it. This method is called before performing any point-to-cloud comparison. If the result is not POINT_VISIBLE, then the comparison won't be performed and the scalar field value associated to this point will be this visibility value.
P | the 3D point to test |
Reimplemented in CCCoreLib::ReferenceCloud.