ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
OctNode< NodeData > Class Template Reference

#include <Octree.h>

Inheritance diagram for OctNode< NodeData >:
Collaboration diagram for OctNode< NodeData >:

Classes

class  ConstNeighborKey
 
struct  ConstNeighbors
 
class  NeighborKey
 
struct  Neighbors
 

Public Member Functions

 OctNode (void)
 
 ~OctNode (void)
 
int initChildren (void)
 
void depthAndOffset (int &depth, int offset[3]) const
 
void centerIndex (int index[3]) const
 
int depth (void) const
 
template<class Real >
void centerAndWidth (Point3D< Real > &center, Real &width) const
 
template<class Real >
void startAndWidth (Point3D< Real > &start, Real &width) const
 
template<class Real >
bool isInside (Point3D< Real > p) const
 
size_t leaves (void) const
 
size_t maxDepthLeaves (int maxDepth) const
 
size_t nodes (void) const
 
int maxDepth (void) const
 
const OctNoderoot (void) const
 
const OctNodenextLeaf (const OctNode *currentLeaf=NULL) const
 
OctNodenextLeaf (OctNode *currentLeaf=NULL)
 
const OctNodenextNode (const OctNode *currentNode=NULL) const
 
OctNodenextNode (OctNode *currentNode=NULL)
 
const OctNodenextBranch (const OctNode *current) const
 
OctNodenextBranch (OctNode *current)
 
const OctNodeprevBranch (const OctNode *current) const
 
OctNodeprevBranch (OctNode *current)
 
void setFullDepth (int maxDepth)
 
void printLeaves (void) const
 
void printRange (void) const
 
OctNodefaceNeighbor (int faceIndex, int forceChildren=0)
 
const OctNodefaceNeighbor (int faceIndex) const
 
OctNodeedgeNeighbor (int edgeIndex, int forceChildren=0)
 
const OctNodeedgeNeighbor (int edgeIndex) const
 
OctNodecornerNeighbor (int cornerIndex, int forceChildren=0)
 
const OctNodecornerNeighbor (int cornerIndex) const
 
int write (const char *fileName) const
 
int write (FILE *fp) const
 
int read (const char *fileName)
 
int read (FILE *fp)
 
void centerIndex (int maxDepth, int index[3]) const
 
int width (int maxDepth) const
 

Static Public Member Functions

static int UseAllocator (void)
 
static void SetAllocator (int blockSize)
 
static void DepthAndOffset (const long long &index, int &depth, int offset[3])
 
template<class Real >
static void CenterAndWidth (const long long &index, Point3D< Real > &center, Real &width)
 
template<class Real >
static void StartAndWidth (const long long &index, Point3D< Real > &start, Real &width)
 
static int Depth (const long long &index)
 
static void Index (int depth, const int offset[3], short &d, short off[3])
 
static unsigned long long Index (int depth, const int offset[3])
 
template<class Real >
static int CornerIndex (const Point3D< Real > &center, const Point3D< Real > &p)
 

Public Attributes

OctNodeparent
 
OctNodechildren
 
NodeData nodeData
 

Static Public Attributes

static const int DepthShift
 
static const int OffsetShift
 
static const int OffsetShift1
 
static const int OffsetShift2
 
static const int OffsetShift3
 
static const int DepthMask
 
static const int OffsetMask
 
static Allocator< OctNodeNodeAllocator
 

Detailed Description

template<class NodeData>
class OctNode< NodeData >

Definition at line 41 of file Octree.h.

Constructor & Destructor Documentation

◆ OctNode()

template<class NodeData >
OctNode< NodeData >::OctNode ( void  )

◆ ~OctNode()

template<class NodeData >
OctNode< NodeData >::~OctNode ( void  )

Member Function Documentation

◆ CenterAndWidth()

template<class NodeData >
template<class Real >
static void OctNode< NodeData >::CenterAndWidth ( const long long &  index,
Point3D< Real > &  center,
Real &  width 
)
inlinestatic

◆ centerAndWidth()

template<class NodeData >
template<class Real >
void OctNode< NodeData >::centerAndWidth ( Point3D< Real > &  center,
Real &  width 
) const

◆ centerIndex() [1/2]

template<class NodeData >
void OctNode< NodeData >::centerIndex ( int  index[3]) const

◆ centerIndex() [2/2]

template<class NodeData >
void OctNode< NodeData >::centerIndex ( int  maxDepth,
int  index[3] 
) const

◆ CornerIndex()

template<class NodeData >
template<class Real >
static int OctNode< NodeData >::CornerIndex ( const Point3D< Real > &  center,
const Point3D< Real > &  p 
)
static

◆ cornerNeighbor() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::cornerNeighbor ( int  cornerIndex) const

◆ cornerNeighbor() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::cornerNeighbor ( int  cornerIndex,
int  forceChildren = 0 
)

◆ Depth()

template<class NodeData >
static int OctNode< NodeData >::Depth ( const long long &  index)
inlinestatic

◆ depth()

template<class NodeData >
int OctNode< NodeData >::depth ( void  ) const

Referenced by Octree< Real >::_Depth().

◆ DepthAndOffset()

template<class NodeData >
static void OctNode< NodeData >::DepthAndOffset ( const long long &  index,
int &  depth,
int  offset[3] 
)
inlinestatic

◆ depthAndOffset()

template<class NodeData >
void OctNode< NodeData >::depthAndOffset ( int &  depth,
int  offset[3] 
) const

◆ edgeNeighbor() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::edgeNeighbor ( int  edgeIndex) const

◆ edgeNeighbor() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::edgeNeighbor ( int  edgeIndex,
int  forceChildren = 0 
)

◆ faceNeighbor() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::faceNeighbor ( int  faceIndex) const

◆ faceNeighbor() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::faceNeighbor ( int  faceIndex,
int  forceChildren = 0 
)

◆ Index() [1/2]

template<class NodeData >
static unsigned long long OctNode< NodeData >::Index ( int  depth,
const int  offset[3] 
)
inlinestatic

◆ Index() [2/2]

template<class NodeData >
static void OctNode< NodeData >::Index ( int  depth,
const int  offset[3],
short &  d,
short  off[3] 
)
inlinestatic

◆ initChildren()

template<class NodeData >
int OctNode< NodeData >::initChildren ( void  )

◆ isInside()

template<class NodeData >
template<class Real >
bool OctNode< NodeData >::isInside ( Point3D< Real >  p) const

◆ leaves()

template<class NodeData >
size_t OctNode< NodeData >::leaves ( void  ) const

Referenced by Octree< Real >::leaves().

◆ maxDepth()

template<class NodeData >
int OctNode< NodeData >::maxDepth ( void  ) const

◆ maxDepthLeaves()

template<class NodeData >
size_t OctNode< NodeData >::maxDepthLeaves ( int  maxDepth) const

◆ nextBranch() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::nextBranch ( const OctNode< NodeData > *  current) const

◆ nextBranch() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::nextBranch ( OctNode< NodeData > *  current)

◆ nextLeaf() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::nextLeaf ( const OctNode< NodeData > *  currentLeaf = NULL) const

◆ nextLeaf() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::nextLeaf ( OctNode< NodeData > *  currentLeaf = NULL)

◆ nextNode() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::nextNode ( const OctNode< NodeData > *  currentNode = NULL) const

◆ nextNode() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::nextNode ( OctNode< NodeData > *  currentNode = NULL)

◆ nodes()

template<class NodeData >
size_t OctNode< NodeData >::nodes ( void  ) const

Referenced by Octree< Real >::nodes().

◆ prevBranch() [1/2]

template<class NodeData >
const OctNode* OctNode< NodeData >::prevBranch ( const OctNode< NodeData > *  current) const

◆ prevBranch() [2/2]

template<class NodeData >
OctNode* OctNode< NodeData >::prevBranch ( OctNode< NodeData > *  current)

◆ printLeaves()

template<class NodeData >
void OctNode< NodeData >::printLeaves ( void  ) const

◆ printRange()

template<class NodeData >
void OctNode< NodeData >::printRange ( void  ) const

◆ read() [1/2]

template<class NodeData >
int OctNode< NodeData >::read ( const char *  fileName)

◆ read() [2/2]

template<class NodeData >
int OctNode< NodeData >::read ( FILE *  fp)

◆ root()

template<class NodeData >
const OctNode* OctNode< NodeData >::root ( void  ) const

◆ SetAllocator()

template<class NodeData >
static void OctNode< NodeData >::SetAllocator ( int  blockSize)
static

◆ setFullDepth()

template<class NodeData >
void OctNode< NodeData >::setFullDepth ( int  maxDepth)

◆ StartAndWidth()

template<class NodeData >
template<class Real >
static void OctNode< NodeData >::StartAndWidth ( const long long &  index,
Point3D< Real > &  start,
Real &  width 
)
inlinestatic

◆ startAndWidth()

template<class NodeData >
template<class Real >
void OctNode< NodeData >::startAndWidth ( Point3D< Real > &  start,
Real &  width 
) const

◆ UseAllocator()

template<class NodeData >
static int OctNode< NodeData >::UseAllocator ( void  )
static

◆ width()

template<class NodeData >
int OctNode< NodeData >::width ( int  maxDepth) const

◆ write() [1/2]

template<class NodeData >
int OctNode< NodeData >::write ( const char *  fileName) const

◆ write() [2/2]

template<class NodeData >
int OctNode< NodeData >::write ( FILE *  fp) const

Member Data Documentation

◆ children

template<class NodeData >
OctNode* OctNode< NodeData >::children

Definition at line 60 of file Octree.h.

◆ DepthMask

template<class NodeData >
const int OctNode< NodeData >::DepthMask
static

Definition at line 53 of file Octree.h.

◆ DepthShift

template<class NodeData >
const int OctNode< NodeData >::DepthShift
static

Definition at line 52 of file Octree.h.

◆ NodeAllocator

template<class NodeData >
Allocator< OctNode > OctNode< NodeData >::NodeAllocator
static

Definition at line 55 of file Octree.h.

◆ nodeData

template<class NodeData >
NodeData OctNode< NodeData >::nodeData

Definition at line 61 of file Octree.h.

Referenced by Octree< Real >::_IsValidNode(), and SparseNodeData< Data, Degree >::index().

◆ OffsetMask

template<class NodeData >
const int OctNode< NodeData >::OffsetMask
static

Definition at line 53 of file Octree.h.

◆ OffsetShift

template<class NodeData >
const int OctNode< NodeData >::OffsetShift
static

Definition at line 52 of file Octree.h.

◆ OffsetShift1

template<class NodeData >
const int OctNode< NodeData >::OffsetShift1
static

Definition at line 52 of file Octree.h.

◆ OffsetShift2

template<class NodeData >
const int OctNode< NodeData >::OffsetShift2
static

Definition at line 52 of file Octree.h.

◆ OffsetShift3

template<class NodeData >
const int OctNode< NodeData >::OffsetShift3
static

Definition at line 52 of file Octree.h.

◆ parent

template<class NodeData >
OctNode* OctNode< NodeData >::parent

Definition at line 59 of file Octree.h.


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