 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
41 inline unsigned size()
const override {
42 return static_cast<unsigned>(m_theIndexes.size());
44 void forEach(genericPointAction action)
override;
47 assert(m_theAssociatedCloud);
48 return m_theAssociatedCloud->testVisibility(P);
52 assert(m_theAssociatedCloud);
53 return (m_globalIterator <
size()
54 ? m_theAssociatedCloud->getPoint(
55 m_theIndexes[m_globalIterator++])
59 assert(m_theAssociatedCloud);
60 return m_theAssociatedCloud->enableScalarField();
63 assert(m_theAssociatedCloud);
64 return m_theAssociatedCloud->isScalarFieldEnabled();
67 ScalarType value)
override {
68 assert(m_theAssociatedCloud && pointIndex <
size());
69 m_theAssociatedCloud->setPointScalarValue(m_theIndexes[pointIndex],
73 assert(m_theAssociatedCloud && pointIndex <
size());
74 return m_theAssociatedCloud->getPointScalarValue(
75 m_theIndexes[pointIndex]);
80 assert(m_theAssociatedCloud && index <
size());
81 return m_theAssociatedCloud->getPoint(m_theIndexes[index]);
84 assert(m_theAssociatedCloud && index <
size());
85 m_theAssociatedCloud->getPoint(m_theIndexes[index], P);
87 inline void getPoint(
unsigned index,
double P[3])
const override {
88 assert(m_theAssociatedCloud && index <
size());
89 m_theAssociatedCloud->getPoint(m_theIndexes[index], P);
94 assert(m_theAssociatedCloud && index <
size());
95 return m_theAssociatedCloud->getPointPersistentPtr(m_theIndexes[index]);
104 return m_theIndexes[localIndex];
110 virtual const CCVector3* getCurrentPointCoordinates()
const;
114 assert(m_globalIterator <
size());
115 return m_theIndexes[m_globalIterator];
120 assert(m_theAssociatedCloud && m_globalIterator <
size());
121 return m_theAssociatedCloud->getPointScalarValue(
122 m_theIndexes[m_globalIterator]);
127 assert(m_theAssociatedCloud && m_globalIterator <
size());
128 m_theAssociatedCloud->setPointScalarValue(
129 m_theIndexes[m_globalIterator], value);
138 virtual void clear(
bool releaseMemory =
false);
145 virtual bool addPointIndex(
unsigned globalIndex);
153 virtual bool addPointIndex(
unsigned firstIndex,
unsigned lastIndex);
159 virtual void setPointIndex(
unsigned localIndex,
unsigned globalIndex);
165 virtual bool reserve(
unsigned n);
171 virtual bool resize(
unsigned n);
175 return static_cast<unsigned>(m_theIndexes.capacity());
185 inline virtual void swap(
unsigned i,
unsigned j) {
187 std::swap(m_theIndexes[i], m_theIndexes[j]);
196 removePointGlobalIndex(m_globalIterator);
203 virtual void removePointGlobalIndex(
unsigned localIndex);
207 return m_theAssociatedCloud;
213 return m_theAssociatedCloud;
virtual void setCurrentPointScalarValue(ScalarType value)
Sets the current point associated scalar value.
Definition: ReferenceCloud.h:126
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
void getPoint(unsigned index, double P[3]) const override
Definition: ReferenceCloud.h:87
unsigned size() const override
Returns the number of points.
Definition: ReferenceCloud.h:41
virtual void swap(unsigned i, unsigned j)
Swaps two point references.
Definition: ReferenceCloud.h:185
GenericIndexedCloudPersist * m_theAssociatedCloud
Associated cloud.
Definition: ReferenceCloud.h:247
virtual const GenericIndexedCloudPersist * getAssociatedCloud() const
Returns the associated (source) cloud (const version)
Definition: ReferenceCloud.h:211
const CCVector3 * getPoint(unsigned index) const override
Returns the ith point.
Definition: ReferenceCloud.h:79
virtual unsigned capacity() const
Returns max capacity.
Definition: ReferenceCloud.h:174
virtual ScalarType getCurrentPointScalarValue() const
Returns the current point associated scalar value.
Definition: ReferenceCloud.h:119
virtual unsigned getPointGlobalIndex(unsigned localIndex) const
Definition: ReferenceCloud.h:103
std::vector< unsigned int > ReferencesContainer
Container of 3D point indexes.
Definition: ReferenceCloud.h:231
std::mutex m_mutex
For concurrent access.
Definition: ReferenceCloud.h:250
virtual unsigned getCurrentPointGlobalIndex() const
Returns the global index of the point pointed by the current element.
Definition: ReferenceCloud.h:113
bool isScalarFieldEnabled() const override
Returns true if the scalar field is enabled, false otherwise.
Definition: ReferenceCloud.h:62
int size
Definition: FileIOFactory.cpp:130
virtual void forwardIterator()
Forwards the local element iterator.
Definition: ReferenceCloud.h:133
void swap(cloudViewer::core::SmallVectorImpl< T > &LHS, cloudViewer::core::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Definition: SmallVector.h:1370
void invalidateBoundingBox()
Invalidates the bounding-box.
Definition: ReferenceCloud.h:227
void placeIteratorAtBeginning() override
Sets the cloud iterator at the beginning.
Definition: ReferenceCloud.h:50
void getPoint(unsigned index, CCVector3 &P) const override
Returns the ith point.
Definition: ReferenceCloud.h:83
bool enableScalarField() override
Enables the scalar field associated to the cloud.
Definition: ReferenceCloud.h:58
void setPointScalarValue(unsigned pointIndex, ScalarType value) override
Sets the ith point associated scalar value.
Definition: ReferenceCloud.h:66
BoundingBox m_bbox
Bounding-box.
Definition: ReferenceCloud.h:240
unsigned char testVisibility(const CCVector3 &P) const override
Definition: ReferenceCloud.h:46
A generic 3D point cloud with index-based and presistent access to points.
Definition: GenericIndexedCloudPersist.h:18
std::atomic< unsigned > m_globalIterator
Iterator on the point references container.
Definition: ReferenceCloud.h:237
A very simple point cloud (no point duplication)
Definition: ReferenceCloud.h:29
const CCVector3 * getNextPoint() override
Returns the next point (relatively to the global iterator position)
Definition: ReferenceCloud.h:51
ReferencesContainer m_theIndexes
Indexes of (some of) the associated cloud points.
Definition: ReferenceCloud.h:234
virtual void removeCurrentPointGlobalIndex()
Removes current element.
Definition: ReferenceCloud.h:195
virtual GenericIndexedCloudPersist * getAssociatedCloud()
Returns the associated (source) cloud.
Definition: ReferenceCloud.h:206
const CCVector3 * getPointPersistentPtr(unsigned index) override
Returns the ith point as a persistent pointer.
Definition: ReferenceCloud.h:93
ScalarType getPointScalarValue(unsigned pointIndex) const override
Returns the ith point associated scalar value.
Definition: ReferenceCloud.h:72
#define CV_CORE_LIB_API
Definition: CVCoreLibWin.h:15