1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
//##########################################################################
//# #
//# CCLIB #
//# #
//# This program is free software; you can redistribute it and/or modify #
//# it under the terms of the GNU Library General Public License as #
//# published by the Free Software Foundation; version 2 or later of the #
//# License. #
//# #
//# This program is distributed in the hope that it will be useful, #
//# but WITHOUT ANY WARRANTY; without even the implied warranty of #
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
//# GNU General Public License for more details. #
//# #
//# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
//# #
//##########################################################################
#ifndef GENERIC_INDEXED_CLOUD_HEADER
#define GENERIC_INDEXED_CLOUD_HEADER
//Local
#include "GenericCloud.h"
namespace CCLib
{
//! A generic 3D point cloud with index-based point access
/** Implements the GenericCloud interface.
**/
class CC_CORE_LIB_API GenericIndexedCloud : virtual public GenericCloud
{
public:
//! Default destructor
~GenericIndexedCloud() override = default;
//! Returns the ith point
/** Virtual method to request a point with a specific index.
WARNINGS:
- the returned object may not be persistent!
- THIS METHOD MAY NOT BE COMPATIBLE WITH PARALLEL STRATEGIES
(see the DgmOctree::executeFunctionForAllCellsAtLevel_MT and
DgmOctree::executeFunctionForAllCellsAtStartingLevel_MT methods).
Consider the other version of getPoint instead or the
GenericIndexedCloudPersist class.
\param index of the requested point (between 0 and the cloud size minus 1)
\return the requested point (undefined behavior if index is invalid)
**/
virtual const CCVector3* getPoint(unsigned index) const = 0;
//! Returns the ith point
/** Virtual method to request a point with a specific index.
Index must be valid (undefined behavior if index is invalid)
\param index of the requested point (between 0 and the cloud size minus 1)
\param P output point
**/
virtual void getPoint(unsigned index, CCVector3& P) const = 0;
};
}
#endif //GENERIC_INDEXED_CLOUD_HEADER
|