21 class GenericProgressCallback;
32 #define CC_DEFAULT_CLOUD_AMBIENT_COLOR ecvColor::bright
33 #define CC_DEFAULT_CLOUD_SPECULAR_COLOR ecvColor::bright
34 #define CC_DEFAULT_CLOUD_DIFFUSE_COLOR ecvColor::bright
35 #define CC_DEFAULT_CLOUD_EMISSION_COLOR ecvColor::night
36 #define CC_DEFAULT_CLOUD_SHININESS 50.0f
73 bool ignoreChildren =
false) = 0;
100 bool autoAddChild =
true);
131 unsigned pointIndex)
const = 0;
150 unsigned pointIndex)
const = 0;
169 return m_pointsVisibility;
174 return m_pointsVisibility;
225 bool removeSelectedPoints =
false,
227 std::vector<int>* newIndexesOfRemainingPoints =
nullptr,
239 std::vector<int>* newIndexes =
nullptr) = 0;
251 bool inside =
true) = 0;
276 m_pointSize =
static_cast<unsigned char>(
size);
295 int& nearestPointIndex,
296 double& nearestSquareDist,
297 double pickWidth = 2.0,
298 double pickHeight = 2.0,
299 bool autoComputeOctree =
false);
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Float version of ccGLMatrixTpl.
A 3D cloud interface with associated features (color, normals, octree, etc.)
virtual void scale(PointCoordinateType fx, PointCoordinateType fy, PointCoordinateType fz, CCVector3 center=CCVector3(0, 0, 0))=0
Multiplies all coordinates by constant factors (one per dimension)
virtual const CCVector3 & getPointNormal(unsigned pointIndex) const =0
Returns normal corresponding to a given point.
virtual ccOctree::Shared computeOctree(cloudViewer::GenericProgressCallback *progressCb=nullptr, bool autoAddChild=true)
Computes the cloud octree.
virtual const ecvColor::Rgb * getScalarValueColor(ScalarType d) const =0
Returns color corresponding to a given scalar value.
virtual const ecvColor::Rgb * getPointScalarValueColor(unsigned pointIndex) const =0
Returns color corresponding to a given point associated scalar value.
ccGenericPointCloud(QString name=QString())
Default constructor.
virtual const VisibilityTableType & getTheVisibilityArray() const
Returns associated visibility array (const version)
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
VisibilityTableType m_pointsVisibility
Per-point visibility table.
unsigned char getPointSize() const
Returns current point size.
virtual void refreshBB()=0
Forces bounding-box update.
virtual cloudViewer::ReferenceCloud * crop(const ecvOrientedBBox &box)=0
virtual bool isVisibilityTableInstantiated() const
Returns whether the visibility array is allocated or not.
unsigned char m_pointSize
Point size (won't be applied if 0)
virtual ccGenericPointCloud * createNewCloudFromVisibilitySelection(bool removeSelectedPoints=false, VisibilityTableType *visTable=nullptr, std::vector< int > *newIndexesOfRemainingPoints=nullptr, bool silent=false, cloudViewer::ReferenceCloud *selection=nullptr)=0
virtual void deleteOctree()
Erases the octree.
short minimumFileVersion_MeOnly() const override
ccGenericPointCloud(const ccGenericPointCloud &cloud)
Copy constructor.
virtual void removePoints(size_t index)=0
void setPointSize(unsigned size=0)
Sets point size.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
~ccGenericPointCloud() override
Default destructor.
bool isSerializable() const override
Returns whether object is serializable of not.
virtual ccOctreeProxy * getOctreeProxy() const
Returns the associated octree proxy (if any)
virtual const ecvColor::Rgb & getPointColor(unsigned pointIndex) const =0
Returns color corresponding to a given point.
virtual void setOctree(ccOctree::Shared octree, bool autoAddChild=true)
Sets the associated octree.
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > computeMeanAndCovariance() const
virtual void invertVisibilityArray()
Inverts the visibility array.
virtual cloudViewer::ReferenceCloud * getTheVisiblePoints(const VisibilityTableType *visTable=nullptr, bool silent=false, cloudViewer::ReferenceCloud *selection=nullptr) const
Returns a ReferenceCloud equivalent to the visibility array.
virtual void applyRigidTransformation(const ccGLMatrix &trans)=0
Applies a rigid transformation (rotation + translation)
virtual VisibilityTableType & getTheVisibilityArray()
Returns associated visibility array.
bool pointPicking(const CCVector2d &clickPos, const ccGLCameraParameters &camera, int &nearestPointIndex, double &nearestSquareDist, double pickWidth=2.0, double pickHeight=2.0, bool autoComputeOctree=false)
Point picking (brute force or octree-driven)
virtual ccGenericPointCloud * clone(ccGenericPointCloud *destCloud=nullptr, bool ignoreChildren=false)=0
Clones this entity.
ccBBox getOwnBB(bool withGLFeatures=false) override
Returns the entity's own bounding-box.
virtual ccOctree::Shared getOctree() const
Returns the associated octree (if any)
virtual ScalarType getPointDisplayedDistance(unsigned pointIndex) const =0
Returns scalar value associated to a given point.
virtual bool resetVisibilityArray()
Resets the associated visibility array.
virtual cloudViewer::ReferenceCloud * crop(const ccBBox &box, bool inside=true)=0
Crops the cloud inside (or outside) a bounding box.
std::vector< unsigned char > VisibilityTableType
Array of "visibility" information for each point.
virtual const CompressedNormType & getPointNormalIndex(unsigned pointIndex) const =0
Returns compressed normal corresponding to a given point.
void importParametersFrom(const ccGenericPointCloud *cloud)
Imports the parameters from another cloud.
virtual void unallocateVisibilityArray()
Erases the points visibility information.
virtual bool removeVisiblePoints(VisibilityTableType *visTable=nullptr, std::vector< int > *newIndexes=nullptr)=0
Removes all the 'visible' points (as defined by the visibility array)
virtual void clear()
Clears the entity from all its points and features.
cloudViewer::SquareMatrixd computeCovariance() const
QSharedPointer< ccOctree > Shared
Shared pointer.
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
Shifted entity interface.
A generic 3D point cloud with index-based and presistent access to points.
A very simple point cloud (no point duplication)
unsigned int CompressedNormType
Compressed normals type.
Generic file read and write utility for python interface.
OpenGL camera parameters.