Helios++
Helios software for LiDAR simulations
KDTreeNodeRoot Class Reference

Class representing the root node of a KDTree. More...

#include <KDTreeNodeRoot.h>

Inheritance diagram for KDTreeNodeRoot:
Collaboration diagram for KDTreeNodeRoot:

Public Member Functions

 KDTreeNodeRoot ()
 Constructor for KDTree root node.
 
virtual bool isDynamic () const
 Check whether the KDTree is dynamic (true) or not (false) More...
 
- Public Member Functions inherited from KDTreeNode
 KDTreeNode ()
 Default constructor for KDTreeNode.
 
 KDTreeNode (KDTreeNode const &kdtn)
 Copy constructor for KDTreeNode. More...
 
 KDTreeNode (KDTreeNode &&kdtn)
 Move constructor for KDTreeNode. More...
 
virtual ~KDTreeNode ()=default
 Destructor for KDTreeNode.
 
KDTreeNodeoperator= (KDTreeNode const &kdtn)
 Copy assignment operator for KDTreeNode. More...
 
KDTreeNodeoperator= (KDTreeNode &&kdtn)
 Move assignment operator for KDTreeNode. More...
 
void swap (KDTreeNode &kdtn)
 Swap attributes of given KDTreeNode and current KDTreeNode. More...
 
void writeObject (std::string path)
 Serialize KDTree. More...
 
- Public Member Functions inherited from LightKDTreeNode
 LightKDTreeNode ()=default
 Default constructor for LightKDTreeNode.
 
 LightKDTreeNode (LightKDTreeNode const &kdtn)
 Copy constructor for LightKDTreeNode. More...
 
 LightKDTreeNode (LightKDTreeNode &&kdtn)
 Move constructor for LightKDTreeNode. More...
 
virtual ~LightKDTreeNode ()
 Destructor for LightKDTreeNode.
 
LightKDTreeNodeoperator= (LightKDTreeNode const &kdtn)
 Copy assignment operator for LightKDTreeNode. More...
 
LightKDTreeNodeoperator= (LightKDTreeNode &&kdtn)
 Move assignment operator for LightKDTreeNode. More...
 
void swap (LightKDTreeNode &kdtn)
 Swap attributes of given LightKDTreeNode and current LightKDTreeNode. More...
 
LightKDTreeNodegetLeftChild () const override
 
LightKDTreeNodegetRightChild () const override
 
BinaryTreeDepthIterator< LightKDTreeNodebuildDepthIterator (int const depth=0)
 Build a depth iterator starting at this node. More...
 
BinaryTreeFastDepthIterator< LightKDTreeNodebuildFastDepthIterator ()
 Build a fast depth iterator starting at this node. More...
 
BinaryTreeBreadthIterator< LightKDTreeNodebuildBreadthIterator (int const depth=0)
 Build a breadth iterator starting at this node. More...
 
BinaryTreeFastBreadthIterator< LightKDTreeNodebuildFastBreadthIterator ()
 Build a fast breadth iterator starting at this node. More...
 
- Public Member Functions inherited from IBinaryTreeNode
virtual bool isLeafNode () const
 Check whether current node is a leaf node (true) or not (false) More...
 

Public Attributes

int stats_maxNumPrimsInLeaf
 Maximum number of primitives considering all leaves.
 
int stats_minNumPrimsInLeaf
 Minimum number of primitives considering all leaves.
 
int stats_maxDepthReached
 Maximum depth of the KDTree.
 
int stats_numInterior
 Number of interior nodes in the KDTree.
 
int stats_numLeaves
 Number of leaf nodes in the KDTree.
 
double stats_totalCost
 The total cost of the tree. It changes depending on tree building strategy. It might be NaN if tree building strategy is not based on computing any cost.
 
vector< LightKDTreeNode * > blocks
 Vector of pointers to the start of each allocated block of LightKDTreeNode. If it is empty, it means the tree has not been lightened, thus its allocation is not block based.a. More...
 
vector< size_t > blocksSize
 The size (number of nodes) for each allocated block, if any. More...
 
- Public Attributes inherited from KDTreeNode
AABB bound
 The axis-aligned boundary of the node.
 
double surfaceArea = std::numeric_limits<double>::quiet_NaN()
 The summation of areas for all faces at node boundaries.
 
- Public Attributes inherited from LightKDTreeNode
LightKDTreeNodeleft = nullptr
 Pointer to node at left side on space partition. Can be nullptr if there is no left side node.
 
LightKDTreeNoderight = nullptr
 
double splitPos = 0
 Point position at corresponding split axis.
 
int splitAxis = 0
 Space axis to consider at current depth.
 
std::shared_ptr< std::vector< Primitive * > > primitives
 Vector of primitives associated with the node.
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a KDTreeNodeRoot to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Public Member Functions inherited from KDTreeNode
static KDTreeNodereadObject (std::string path)
 Import a serialized KDTree from file. More...
 

Detailed Description

Class representing the root node of a KDTree.

See also
KDTreeNode

Member Function Documentation

◆ isDynamic()

virtual bool KDTreeNodeRoot::isDynamic ( ) const
inlinevirtual

Check whether the KDTree is dynamic (true) or not (false)

Returns
True if KDTree is dynamic, false otherwise

◆ serialize()

template<typename Archive >
void KDTreeNodeRoot::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a KDTreeNodeRoot to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for the KDTreeNodeRoot

Member Data Documentation

◆ blocks

vector<LightKDTreeNode *> KDTreeNodeRoot::blocks

Vector of pointers to the start of each allocated block of LightKDTreeNode. If it is empty, it means the tree has not been lightened, thus its allocation is not block based.a.

See also
KDTreeNodeRoot::blocksSize

◆ blocksSize

vector<size_t> KDTreeNodeRoot::blocksSize

The size (number of nodes) for each allocated block, if any.

See also
KDTreeNodeRoot::blocks

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