qCC_db version 2.13.alpha (Qt) - 31 May 2022
CloudCompare 3D entities
|
Octree structure. More...
#include <ccOctree.h>
Classes | |
struct | BestRadiusParams |
Parameters for the GuessBestRadius method. More... | |
Public Types | |
enum | DisplayMode { WIRE = 0 , MEAN_POINTS = 1 , MEAN_CUBES = 2 } |
Octree displaying methods. More... | |
typedef QSharedPointer< ccOctree > | Shared |
Shared pointer. | |
Signals | |
void | updated () |
Signal sent when the octree organization is modified (cleared, etc.) | |
Public Member Functions | |
ccOctree (ccGenericPointCloud *cloud) | |
Default constructor. More... | |
virtual | ~ccOctree () |
Destructor. | |
void | multiplyBoundingBox (const PointCoordinateType multFactor) |
Multiplies the bounding-box of the octree. More... | |
void | translateBoundingBox (const CCVector3 &T) |
Translates the bounding-box of the octree. More... | |
ccBBox | getSquareBB () const |
Returns the octree (square) bounding-box. | |
ccBBox | getPointsBB () const |
Returns the points bounding-box. | |
virtual void | clear () override |
int | getDisplayedLevel () const |
Returns the currently displayed octree level. | |
void | setDisplayedLevel (int level) |
Sets the currently displayed octree level. | |
DisplayMode | getDisplayMode () const |
Returns the currently display mode. | |
void | setDisplayMode (DisplayMode mode) |
Sets the currently display mode. | |
void | draw (CC_DRAW_CONTEXT &context) |
Draws the octree. | |
bool | intersectWithFrustum (ccCameraSensor *sensor, std::vector< unsigned > &inCameraFrustum) |
Intersects octree with a camera sensor. | |
bool | pointPicking (const CCVector2d &clickPos, const ccGLCameraParameters &camera, PointDescriptor &output, double pickWidth_pix=3.0) const |
Octree-driven point picking algorithm. | |
Static Public Member Functions | |
static void | ComputeAverageColor (CCCoreLib::ReferenceCloud *subset, ccGenericPointCloud *sourceCloud, ColorCompType meanCol[]) |
Computes the average color of a set of points. | |
static CCVector3 | ComputeAverageNorm (CCCoreLib::ReferenceCloud *subset, ccGenericPointCloud *sourceCloud) |
Computes the average normal of a set of points. | |
static PointCoordinateType | GuessNaiveRadius (ccGenericPointCloud *cloud) |
Tries to guess a very naive 'local radius' for octree-based computation. More... | |
static PointCoordinateType | GuessBestRadius (ccGenericPointCloud *cloud, const BestRadiusParams ¶ms, CCCoreLib::DgmOctree *cloudOctree=nullptr, CCCoreLib::GenericProgressCallback *progressCb=nullptr) |
Tries to guess the best 'local radius' for octree-based computation. More... | |
static PointCoordinateType | GuessBestRadiusAutoComputeOctree (ccGenericPointCloud *cloud, const BestRadiusParams ¶ms, QWidget *parentWidget=nullptr) |
Tries to guess the best 'local radius' for octree-based computation (auto-computes the octree if necessary) More... | |
Protected Attributes | |
ccGenericPointCloud * | m_theAssociatedCloudAsGPC |
Associated cloud (as a ccGenericPointCloud) | |
int | m_displayedLevel |
Displayed level. | |
DisplayMode | m_displayMode |
Display mode. | |
GLuint | m_glListID |
OpenGL display list. | |
bool | m_glListIsDeprecated |
Whether the display (list) should be refreshed or not. | |
ccOctreeFrustumIntersector * | m_frustumIntersector |
For frustum intersection. | |
Octree structure.
Extends the CCCoreLib::DgmOctree class.
|
explicit |
Default constructor.
cloud | a point cloud |
|
static |
Tries to guess the best 'local radius' for octree-based computation.
The ideal radius is determined by randomly sampling up to 200 points and looking at their neighborhood.
cloud | point cloud on which to process the normals. |
params | parameters |
cloudOctree | input cloud octree (optional) |
progressCb | progress notification (optional) |
|
static |
Tries to guess the best 'local radius' for octree-based computation (auto-computes the octree if necessary)
The ideal radius is determined by randomly sampling up to 200 points and looking at their neighborhood.
cloud | point cloud on which to process the normals. |
params | parameters |
parentWidget | parent widget (for the progress dialog, if any has to be shown) |
|
static |
Tries to guess a very naive 'local radius' for octree-based computation.
cloud | point cloud on which to process the normals. |
void ccOctree::multiplyBoundingBox | ( | const PointCoordinateType | multFactor | ) |
Multiplies the bounding-box of the octree.
If the cloud coordinates are simply multiplied by the same factor, there is no use in recomputing the octree structure. It's sufficient to update its bounding-box.
multFactor | multiplication factor |
void ccOctree::translateBoundingBox | ( | const CCVector3 & | T | ) |
Translates the bounding-box of the octree.
If the cloud has been simply translated, there is no use to recompute the octree structure. It's sufficient to update its bounding-box.
T | translation vector |