![]() |
CCCoreLib 31 May 2022
CloudCompare Core algorithms
|
A simple polyline class. More...
#include <Polyline.h>
Public Member Functions | |
Polyline (GenericIndexedCloudPersist *associatedCloud) | |
Polyline constructor. | |
bool | isClosed () const |
Returns whether the polyline is closed or not. | |
virtual void | setClosed (bool state) |
Sets whether the polyline is closed or not. | |
void | clear (bool unusedParam=true) override |
Clears the cloud. More... | |
![]() | |
ReferenceCloud (GenericIndexedCloudPersist *associatedCloud) | |
Default constructor. | |
ReferenceCloud (const ReferenceCloud &refCloud) | |
Copy constructor. | |
~ReferenceCloud () override=default | |
Destructor. | |
unsigned | size () const override |
Returns the number of points. More... | |
void | forEach (genericPointAction action) override |
Fast iteration mechanism. More... | |
void | getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax) override |
Returns the cloud bounding box. More... | |
unsigned char | testVisibility (const CCVector3 &P) const override |
Returns a given point visibility state (relatively to a sensor for instance) More... | |
void | placeIteratorAtBeginning () override |
Sets the cloud iterator at the beginning. More... | |
const CCVector3 * | getNextPoint () override |
Returns the next point (relatively to the global iterator position) More... | |
bool | enableScalarField () override |
Enables the scalar field associated to the cloud. More... | |
bool | isScalarFieldEnabled () const override |
Returns true if the scalar field is enabled, false otherwise. More... | |
void | setPointScalarValue (unsigned pointIndex, ScalarType value) override |
Sets the ith point associated scalar value. More... | |
ScalarType | getPointScalarValue (unsigned pointIndex) const override |
Returns the ith point associated scalar value. More... | |
const CCVector3 * | getPoint (unsigned index) const override |
Returns the ith point. More... | |
void | getPoint (unsigned index, CCVector3 &P) const override |
Returns the ith point. More... | |
bool | normalsAvailable () const override |
Returns whether normals are available. More... | |
const CCVector3 * | getNormal (unsigned index) const override |
If per-point normals are available, returns the one at a specific index. More... | |
const CCVector3 * | getPointPersistentPtr (unsigned index) const override |
Returns the ith point as a persistent pointer. More... | |
virtual unsigned | getPointGlobalIndex (unsigned localIndex) const |
Returns global index (i.e. relative to the associated cloud) of a given element. More... | |
virtual const CCVector3 * | getCurrentPointCoordinates () const |
Returns the coordinates of the point pointed by the current element. More... | |
virtual unsigned | getCurrentPointGlobalIndex () const |
Returns the global index of the point pointed by the current element. | |
virtual ScalarType | getCurrentPointScalarValue () const |
Returns the current point associated scalar value. | |
virtual void | setCurrentPointScalarValue (ScalarType value) |
Sets the current point associated scalar value. | |
virtual void | forwardIterator () |
Forwards the local element iterator. | |
virtual void | clear (bool releaseMemory=false) |
Clears the cloud. More... | |
virtual bool | addPointIndex (unsigned globalIndex) |
Point global index insertion mechanism. More... | |
virtual bool | addPointIndex (unsigned firstIndex, unsigned lastIndex) |
Point global index insertion mechanism (range) More... | |
virtual void | setPointIndex (unsigned localIndex, unsigned globalIndex) |
Sets global index for a given element. More... | |
virtual bool | reserve (unsigned n) |
Reserves some memory for hosting the point references. More... | |
virtual bool | resize (unsigned n) |
Presets the size of the vector used to store point references. More... | |
virtual unsigned | capacity () const |
Returns max capacity. | |
virtual void | swap (unsigned i, unsigned j) |
Swaps two point references. More... | |
virtual void | removeCurrentPointGlobalIndex () |
Removes current element. More... | |
virtual void | removePointGlobalIndex (unsigned localIndex) |
Removes a given element. More... | |
virtual GenericIndexedCloudPersist * | getAssociatedCloud () |
Returns the associated (source) cloud. | |
virtual const GenericIndexedCloudPersist * | getAssociatedCloud () const |
Returns the associated (source) cloud (const version) | |
virtual void | setAssociatedCloud (GenericIndexedCloudPersist *cloud) |
Sets the associated (source) cloud. | |
bool | add (const ReferenceCloud &cloud) |
Add another reference cloud. More... | |
void | invalidateBoundingBox () |
Invalidates the bounding-box. | |
![]() | |
GenericIndexedCloudPersist ()=default | |
Default constructor. | |
GenericIndexedCloudPersist (const char *name, unsigned ID) | |
Mock constructor for compatibility with the PointCloudTpl interface. More... | |
~GenericIndexedCloudPersist () override=default | |
Default destructor. | |
virtual const CCVector3 * | getPointPersistentPtr (unsigned index) const =0 |
Returns the ith point as a persistent pointer. More... | |
![]() | |
GenericIndexedCloud ()=default | |
Default constructor. | |
~GenericIndexedCloud () override=default | |
Default destructor. | |
virtual const CCVector3 * | getPoint (unsigned index) const =0 |
Returns the ith point. More... | |
virtual void | getPoint (unsigned index, CCVector3 &P) const =0 |
Returns the ith point. More... | |
virtual bool | normalsAvailable () const |
Returns whether normals are available. More... | |
virtual const CCVector3 * | getNormal (unsigned index) const |
If per-point normals are available, returns the one at a specific index. More... | |
![]() | |
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... | |
Protected Attributes | |
bool | m_isClosed |
Closing state. | |
![]() | |
ReferencesContainer | m_theIndexes |
Indexes of (some of) the associated cloud points. | |
std::atomic< unsigned > | m_globalIterator |
Iterator on the point references container. | |
BoundingBox | m_bbox |
Bounding-box. | |
GenericIndexedCloudPersist * | m_theAssociatedCloud |
Associated cloud. More... | |
std::mutex | m_mutex |
For concurrent access. | |
Additional Inherited Members | |
![]() | |
using | genericPointAction = std::function< void(const CCVector3 &, ScalarType &)> |
Generic function applied to a point (used by foreach) | |
![]() | |
using | ReferencesContainer = std::vector< unsigned int > |
Container of 3D point indexes. | |
A simple polyline class.
The polyline is considered as a cloud of points (in a specific order) with a open/closed state information.
|
overridevirtual |