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.

Definition at line 301 of file DgmOctree.h.

Constructor & Destructor Documentation

◆ IndexAndCode() [1/3]

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

Default constructor.

Definition at line 308 of file DgmOctree.h.

◆ IndexAndCode() [2/3]

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

Constructor from an index and a code.

Definition at line 311 of file DgmOctree.h.

◆ IndexAndCode() [3/3]

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

Copy constructor.

Definition at line 315 of file DgmOctree.h.

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'

Definition at line 333 of file DgmOctree.h.

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'

Definition at line 344 of file DgmOctree.h.

◆ operator<()

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

Code-based 'less than' comparison operator.

Definition at line 319 of file DgmOctree.h.

References theCode.

◆ operator>()

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

Code-based 'greater than' comparison operator.

Definition at line 324 of file DgmOctree.h.

References theCode.

Member Data Documentation

◆ theCode

CellCode cloudViewer::DgmOctree::IndexAndCode::theCode

cell code

Definition at line 305 of file DgmOctree.h.

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

◆ theIndex

unsigned cloudViewer::DgmOctree::IndexAndCode::theIndex

index

Definition at line 303 of file DgmOctree.h.


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