3 #include <KDTreeNode.h>
16 friend class boost::serialization::access;
23 template <
typename Archive>
24 void serialize(Archive& ar,
const unsigned int version){
25 boost::serialization::void_cast_register<KDTreeNodeRoot, KDTreeNode>();
26 ar & boost::serialization::base_object<KDTreeNode>(*
this);
99 size_t const numBlocks =
blocks.size();
100 for(
size_t i = 0 ; i < numBlocks ; ++i){
104 for(
size_t j = 0 ; j < numNodes ; ++j){
106 block->
left =
nullptr;
107 block->
right =
nullptr;
Class representing the root node of a KDTree.
Definition: KDTreeNodeRoot.h:12
virtual bool isDynamic() const
Check whether the KDTree is dynamic (true) or not (false)
Definition: KDTreeNodeRoot.h:120
int stats_maxDepthReached
Maximum depth of the KDTree.
Definition: KDTreeNodeRoot.h:48
void serialize(Archive &ar, const unsigned int version)
Serialize a KDTreeNodeRoot to a stream of bytes.
Definition: KDTreeNodeRoot.h:24
vector< LightKDTreeNode * > blocks
Vector of pointers to the start of each allocated block of LightKDTreeNode. If it is empty,...
Definition: KDTreeNodeRoot.h:69
int stats_numLeaves
Number of leaf nodes in the KDTree.
Definition: KDTreeNodeRoot.h:56
vector< size_t > blocksSize
The size (number of nodes) for each allocated block, if any.
Definition: KDTreeNodeRoot.h:74
int stats_minNumPrimsInLeaf
Minimum number of primitives considering all leaves.
Definition: KDTreeNodeRoot.h:44
int stats_maxNumPrimsInLeaf
Maximum number of primitives considering all leaves.
Definition: KDTreeNodeRoot.h:40
double stats_totalCost
The total cost of the tree. It changes depending on tree building strategy. It might be NaN if tree b...
Definition: KDTreeNodeRoot.h:62
int stats_numInterior
Number of interior nodes in the KDTree.
Definition: KDTreeNodeRoot.h:52
KDTreeNodeRoot()
Constructor for KDTree root node.
Definition: KDTreeNodeRoot.h:82
Class representing a KDTree node.
Definition: KDTreeNode.h:9
Class representing a light KDTree node. It is, the basic representation of a KDTree node with uses le...
Definition: LightKDTreeNode.h:28
LightKDTreeNode * right
Definition: LightKDTreeNode.h:70
LightKDTreeNode * left
Pointer to node at left side on space partition. Can be nullptr if there is no left side node.
Definition: LightKDTreeNode.h:65