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

Association between an index and the code of an octree cell. More...

#include <DgmOctree.h>

Public Member Functions

 IndexAndCode ()
 Default constructor. More...
 
 IndexAndCode (unsigned index, CellCode code)
 Constructor from an index and a code. More...
 
 IndexAndCode (const IndexAndCode &ic)
 Copy constructor. More...
 
bool operator< (const IndexAndCode &iac) const
 Code-based 'less than' comparison operator. More...
 
bool operator> (const IndexAndCode &iac) const
 Code-based 'greater than' comparison operator. More...
 

Static Public Member Functions

static bool codeComp (const IndexAndCode &a, const IndexAndCode &b) throw ()
 Compares two IndexAndCode instances based on their code. More...
 
static bool indexComp (const IndexAndCode &a, const IndexAndCode &b) throw ()
 Compares two IndexAndCode instances based on their index. More...
 

Public Attributes

unsigned theIndex
 index More...
 
CellCode theCode
 cell code More...
 

Detailed Description

Association between an index and the code of an octree cell.

Index could be the index of a point, in which case the code would correspond to the octree cell where the point lies.

Constructor & Destructor Documentation

◆ IndexAndCode() [1/3]

cloudViewer::DgmOctree::IndexAndCode::IndexAndCode ( )
inline

Default constructor.

◆ IndexAndCode() [2/3]

cloudViewer::DgmOctree::IndexAndCode::IndexAndCode ( unsigned  index,
CellCode  code 
)
inline

Constructor from an index and a code.

◆ IndexAndCode() [3/3]

cloudViewer::DgmOctree::IndexAndCode::IndexAndCode ( const IndexAndCode &  ic)
inline

Copy constructor.

Member Function Documentation

◆ codeComp()

static bool cloudViewer::DgmOctree::IndexAndCode::codeComp ( const IndexAndCode &  a,
const IndexAndCode &  b 
)
throw (
)
inlinestatic

Compares two IndexAndCode instances based on their code.

Parameters
afirst IndexAndCode structure
bsecond IndexAndCode structure
Returns
whether the code of 'a' is smaller than the code of 'b'

References a.

Referenced by cloudViewer::DgmOctree::genericBuild().

◆ indexComp()

static bool cloudViewer::DgmOctree::IndexAndCode::indexComp ( const IndexAndCode &  a,
const IndexAndCode &  b 
)
throw (
)
inlinestatic

Compares two IndexAndCode instances based on their index.

Parameters
afirst IndexAndCode structure
bsecond IndexAndCode structure
Returns
whether the index of 'a' is smaller than the index of 'b'

References a.

◆ operator<()

bool cloudViewer::DgmOctree::IndexAndCode::operator< ( const IndexAndCode &  iac) const
inline

Code-based 'less than' comparison operator.

References theCode.

◆ operator>()

bool cloudViewer::DgmOctree::IndexAndCode::operator> ( const IndexAndCode &  iac) const
inline

Code-based 'greater than' comparison operator.

References theCode.

Member Data Documentation

◆ theCode

CellCode cloudViewer::DgmOctree::IndexAndCode::theCode

cell code

Referenced by operator<(), and operator>().

◆ theIndex

unsigned cloudViewer::DgmOctree::IndexAndCode::theIndex

index


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