CCCoreLib 31 May 2022
CloudCompare Core algorithms
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CCCoreLib::DgmOctree::PointDescriptor Struct Reference

Structure used during nearest neighbour search. More...

#include <DgmOctree.h>

Collaboration diagram for CCCoreLib::DgmOctree::PointDescriptor:
Collaboration graph
[legend]

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

const CCVector3point
 Point.
 
unsigned pointIndex
 Point index.
 
double squareDistd
 Point associated distance value.
 

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).

Member Function Documentation

◆ distComp()

static bool CCCoreLib::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

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