Helios++
Helios software for LiDAR simulations
KDTreeNodeRoot.h
1 #pragma once
2 
3 #include <KDTreeNode.h>
4 #include <vector>
5 using std::vector;
6 
10 class KDTreeNodeRoot : public KDTreeNode {
11  // *** SERIALIZATION *** //
12  // *********************** //
13  friend class boost::serialization::access;
14  template <typename Archive>
15  void serialize(Archive& ar, const unsigned int version)
16  {
17  boost::serialization::void_cast_register<KDTreeNodeRoot, KDTreeNode>();
18  ar & boost::serialization::base_object<KDTreeNode>(*this);
22  }
23 public:
24  // *** ATTRIBUTES *** //
25  // ******************** //
38 
39  // *** CONSTRUCTION / DESTRUCTION *** //
40  // ************************************ //
45  stats_maxNumPrimsInLeaf(0),
46  stats_minNumPrimsInLeaf(std::numeric_limits<int>::max()),
47  stats_maxDepthReached(0) {}
48 
49  ~KDTreeNodeRoot() override = default;
50 
51  // *** CLASS METHODS *** //
52  // *********************** //
58  static KDTreeNodeRoot* build(const std::vector<Primitive*> & primitives);
59 };
int stats_maxNumPrimsInLeaf
Maximum number of primitives considering all leaves.
Definition: KDTreeNodeRoot.h:29
static KDTreeNodeRoot * build(const std::vector< Primitive *> &primitives)
KDTree build method.
Definition: KDTreeNodeRoot.cpp:7
std::vector< Primitive * > primitives
Vector of primitives associated with the node.
Definition: KDTreeNode.h:53
Class representing the root node of a KDTree.
Definition: KDTreeNodeRoot.h:10
KDTreeNodeRoot()
Constructor for KDTree root node.
Definition: KDTreeNodeRoot.h:44
Class representing a KDTree node.
Definition: KDTreeNode.h:16
int stats_minNumPrimsInLeaf
Minimum number of primitives considering all leaves.
Definition: KDTreeNodeRoot.h:33
int stats_maxDepthReached
Maximum depth of the KDTree.
Definition: KDTreeNodeRoot.h:37