![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
A simple polyline class. More...
#include <Polyline.h>


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 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... | |
| void | getPoint (unsigned index, double P[3]) const override |
| const CCVector3 * | getPointPersistentPtr (unsigned index) override |
| Returns the ith point as a persistent pointer. More... | |
| virtual unsigned | getPointGlobalIndex (unsigned localIndex) const |
| 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. 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 GenericIndexedCloudPersist * | getAssociatedCloud () |
| Returns the associated (source) cloud. More... | |
| virtual const GenericIndexedCloudPersist * | getAssociatedCloud () 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 CCVector3 * | getNormal (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... | |
| GenericIndexedCloudPersist * | m_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... | |
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.
|
explicit |
Polyline constructor.
Definition at line 12 of file Polyline.cpp.
|
overridevirtual |
Clears the cloud.
Thread safe.
Reimplemented from cloudViewer::ReferenceCloud.
Definition at line 15 of file Polyline.cpp.
References cloudViewer::ReferenceCloud::clear(), and m_isClosed.
Referenced by ccGraphicalSegmentationTool::addPointToPolyline(), ccGraphicalSegmentationTool::closePolyLine(), ccGraphicalSegmentationTool::closeRectangle(), ccTopologyRelation::constructGraphic(), define_Polyline(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccContourExtractor::ExtractFlatContour(), ccTrace::finalizePath(), ccGraphicalSegmentationTool::pauseSegmentationMode(), qCanupo2DViewDialog::resetBoundary(), ccGraphicalSegmentationTool::start(), and ccGraphicalSegmentationTool::updatePolyLine().
|
inline |
Returns whether the polyline is closed or not.
Definition at line 26 of file Polyline.h.
Referenced by define_Polyline(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccTracePolylineTool::polylineOverSampling(), cloudViewer::geometry::pybind_polyline(), SinusxFilter::saveToFile(), ccGraphicalSegmentationTool::segment(), and ccEntityAction::setColor().
|
inline |
Sets whether the polyline is closed or not.
Definition at line 29 of file Polyline.h.
Referenced by ccGraphicalSegmentationTool::addPointToPolyline(), ccGraphicalSegmentationTool::ccGraphicalSegmentationTool(), ccGraphicalSegmentationTool::closePolyLine(), contourPoly(), contourPoly2(), define_Polyline(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccGraphicalSegmentationTool::doExportSegmentationPolyline(), ccContourExtractor::ExtractConcaveHull2D(), ccContourExtractor::ExtractFlatContour(), ccRasterizeTool::generateContours(), GetConeProfile(), ProfileLoader::Load(), SinusxFilter::loadFile(), CommandCrop2D::process(), cloudViewer::geometry::pybind_polyline(), and ccGraphicalSegmentationTool::updatePolyLine().
|
protected |