ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::DgmOctree::PointDescriptor Struct Reference

Structure used during nearest neighbour search. More...

#include <DgmOctree.h>

Collaboration diagram for cloudViewer::DgmOctree::PointDescriptor:

Public Member Functions

 PointDescriptor ()
 Default constructor. More...
 
 PointDescriptor (const CCVector3 *P, unsigned index)
 Constructor with point and its index. More...
 
 PointDescriptor (const CCVector3 *P, unsigned index, double d2)
 Constructor with point, its index and square distance. More...
 

Static Public Member Functions

static bool distComp (const PointDescriptor &a, const PointDescriptor &b)
 Comparison operator. More...
 

Public Attributes

const CCVector3 * point
 Point. More...
 
unsigned pointIndex
 Point index. More...
 
double squareDistd
 Point associated distance value. More...
 

Detailed Description

Structure used during nearest neighbour search.

Association between a point, its index and its square distance to the query point. It has a comparison operator for fast sorting (stdlib).

Definition at line 101 of file DgmOctree.h.

Constructor & Destructor Documentation

◆ PointDescriptor() [1/3]

cloudViewer::DgmOctree::PointDescriptor::PointDescriptor ( )
inline

Default constructor.

Definition at line 110 of file DgmOctree.h.

◆ PointDescriptor() [2/3]

cloudViewer::DgmOctree::PointDescriptor::PointDescriptor ( const CCVector3 *  P,
unsigned  index 
)
inline

Constructor with point and its index.

Definition at line 113 of file DgmOctree.h.

◆ PointDescriptor() [3/3]

cloudViewer::DgmOctree::PointDescriptor::PointDescriptor ( const CCVector3 *  P,
unsigned  index,
double  d2 
)
inline

Constructor with point, its index and square distance.

Definition at line 117 of file DgmOctree.h.

Member Function Documentation

◆ distComp()

static bool cloudViewer::DgmOctree::PointDescriptor::distComp ( const PointDescriptor &  a,
const PointDescriptor &  b 
)
inlinestatic

Comparison operator.

Parameters
apoint A
bpoint B
Returns
whether the square distance associated to A is smaller than the square distance associated to B

Definition at line 126 of file DgmOctree.h.

References a, and squareDistd.

Referenced by ComputeCorePointDescriptor(), qM3C2Tools::ComputeStatistics(), cloudViewer::DgmOctree::findNearestNeighborsStartingFromCell(), and cloudViewer::DgmOctree::findNeighborsInASphereStartingFromCell().

Member Data Documentation

◆ point

const CCVector3* cloudViewer::DgmOctree::PointDescriptor::point

◆ pointIndex

unsigned cloudViewer::DgmOctree::PointDescriptor::pointIndex

◆ squareDistd

double cloudViewer::DgmOctree::PointDescriptor::squareDistd

The documentation for this struct was generated from the following file: