ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::Polyline Class Reference

A simple polyline class. More...

#include <Polyline.h>

Inheritance diagram for cloudViewer::Polyline:
Collaboration diagram for cloudViewer::Polyline:

Public Member Functions

 Polyline (GenericIndexedCloudPersist *associatedCloud)
 Polyline constructor. More...
 
bool isClosed () const
 Returns whether the polyline is closed or not. More...
 
void setClosed (bool state)
 Sets whether the polyline is closed or not. More...
 
void clear (bool unusedParam=true) override
 Clears the cloud. More...
 
- Public Member Functions inherited from cloudViewer::ReferenceCloud
 ReferenceCloud (GenericIndexedCloudPersist *associatedCloud)
 Default constructor. More...
 
 ReferenceCloud (const ReferenceCloud &refCloud)
 Copy constructor. More...
 
 ~ReferenceCloud () override=default
 Destructor. More...
 
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
 
void placeIteratorAtBeginning () override
 Sets the cloud iterator at the beginning. More...
 
const CCVector3getNextPoint () 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 CCVector3getPoint (unsigned index) const override
 Returns the ith point. More...
 
void getPoint (unsigned index, CCVector3 &P) const override
 Returns the ith point. More...
 
void getPoint (unsigned index, double P[3]) const override
 
const CCVector3getPointPersistentPtr (unsigned index) override
 Returns the ith point as a persistent pointer. More...
 
virtual unsigned getPointGlobalIndex (unsigned localIndex) const
 
virtual const CCVector3getCurrentPointCoordinates () 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. More...
 
virtual ScalarType getCurrentPointScalarValue () const
 Returns the current point associated scalar value. More...
 
virtual void setCurrentPointScalarValue (ScalarType value)
 Sets the current point associated scalar value. More...
 
virtual void forwardIterator ()
 Forwards the local element iterator. 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. More...
 
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 GenericIndexedCloudPersistgetAssociatedCloud ()
 Returns the associated (source) cloud. More...
 
virtual const GenericIndexedCloudPersistgetAssociatedCloud () const
 Returns the associated (source) cloud (const version) More...
 
virtual void setAssociatedCloud (GenericIndexedCloudPersist *cloud)
 Sets the associated (source) cloud. More...
 
bool add (const ReferenceCloud &cloud)
 Add another reference cloud. More...
 
void invalidateBoundingBox ()
 Invalidates the bounding-box. More...
 
- Public Member Functions inherited from cloudViewer::GenericIndexedCloudPersist
 ~GenericIndexedCloudPersist () override=default
 Default destructor. More...
 
- Public Member Functions inherited from cloudViewer::GenericIndexedCloud
 ~GenericIndexedCloud () override=default
 Default destructor. More...
 
virtual bool normalsAvailable () const
 Returns whether normals are available. More...
 
virtual const CCVector3getNormal (unsigned index) const
 If per-point normals are available, returns the one at a specific index. More...
 
- Public Member Functions inherited from cloudViewer::GenericCloud
 GenericCloud ()=default
 Default constructor. More...
 
virtual ~GenericCloud ()=default
 Default destructor. More...
 
virtual bool hasPoints () const
 

Protected Attributes

bool m_isClosed
 Closing state. More...
 
- Protected Attributes inherited from cloudViewer::ReferenceCloud
ReferencesContainer m_theIndexes
 Indexes of (some of) the associated cloud points. More...
 
std::atomic< unsigned > m_globalIterator
 Iterator on the point references container. More...
 
BoundingBox m_bbox
 Bounding-box. More...
 
GenericIndexedCloudPersistm_theAssociatedCloud
 Associated cloud. More...
 
std::mutex m_mutex
 For concurrent access. More...
 

Additional Inherited Members

- Public Types inherited from cloudViewer::GenericCloud
using genericPointAction = std::function< void(const CCVector3 &, ScalarType &)>
 Generic function applied to a point (used by foreach) More...
 
- Protected Types inherited from cloudViewer::ReferenceCloud
using ReferencesContainer = std::vector< unsigned int >
 Container of 3D point indexes. More...
 

Detailed Description

A simple polyline class.

The polyline is considered as a cloud of points (in a specific order) with a open/closed state information.

Definition at line 20 of file Polyline.h.

Constructor & Destructor Documentation

◆ Polyline()

Polyline::Polyline ( GenericIndexedCloudPersist associatedCloud)
explicit

Polyline constructor.

Definition at line 12 of file Polyline.cpp.

Member Function Documentation

◆ clear()

◆ isClosed()

◆ setClosed()

Member Data Documentation

◆ m_isClosed

bool cloudViewer::Polyline::m_isClosed
protected

Closing state.

Definition at line 36 of file Polyline.h.

Referenced by clear().


The documentation for this class was generated from the following files: