6 #include <boost/archive/text_iarchive.hpp>
7 #include <boost/archive/text_oarchive.hpp>
8 #include <boost/serialization/vector.hpp>
10 #include <IBinaryTreeNode.h>
11 #include <BinaryTreeDepthIterator.h>
12 #include <BinaryTreeFastDepthIterator.h>
13 #include <BinaryTreeBreadthIterator.h>
14 #include <BinaryTreeFastBreadthIterator.h>
16 #include <Primitive.h>
22 #include <DetailedVoxel.h>
32 friend class boost::serialization::access;
39 template <
class Archive>
40 void serialize(Archive &ar,
const unsigned int version){
42 ar.template register_type<Vertex>();
43 ar.template register_type<AABB>();
44 ar.template register_type<Triangle>();
45 ar.template register_type<Voxel>();
46 ar.template register_type<DetailedVoxel>();
48 boost::serialization::void_cast_register<
156 {
return {
this, depth};}
174 {
return {
this, depth};}
Like fast breadth first iterator but wrapping tree nodes inside a IterableTreeNode instance.
Definition: BinaryTreeBreadthIterator.h:30
Like fast depth first iterator but wrapping tree nodes inside a IterableTreeNode instance.
Definition: BinaryTreeDepthIterator.h:30
Fast breadth first iterator for binary tree like nodes.
Definition: BinaryTreeFastBreadthIterator.h:43
Fast depth first iterator for binary tree like nodes.
Definition: BinaryTreeFastDepthIterator.h:47
Binary tree node interface that must be implemented by any class providing binary tree node based fun...
Definition: IBinaryTreeNode.h:10
Class representing a light KDTree node. It is, the basic representation of a KDTree node with uses le...
Definition: LightKDTreeNode.h:28
BinaryTreeBreadthIterator< LightKDTreeNode > buildBreadthIterator(int const depth=0)
Build a breadth iterator starting at this node.
Definition: LightKDTreeNode.h:171
LightKDTreeNode & operator=(LightKDTreeNode const &kdtn)
Copy assignment operator for LightKDTreeNode.
Definition: LightKDTreeNode.cpp:27
LightKDTreeNode * getRightChild() const override
Definition: LightKDTreeNode.h:142
std::shared_ptr< std::vector< Primitive * > > primitives
Vector of primitives associated with the node.
Definition: LightKDTreeNode.h:82
LightKDTreeNode()=default
Default constructor for LightKDTreeNode.
BinaryTreeFastDepthIterator< LightKDTreeNode > buildFastDepthIterator()
Build a fast depth iterator starting at this node.
Definition: LightKDTreeNode.h:163
double splitPos
Point position at corresponding split axis.
Definition: LightKDTreeNode.h:74
LightKDTreeNode * right
Definition: LightKDTreeNode.h:70
BinaryTreeFastBreadthIterator< LightKDTreeNode > buildFastBreadthIterator()
Build a fast breadth iterator starting at this node.
Definition: LightKDTreeNode.h:181
BinaryTreeDepthIterator< LightKDTreeNode > buildDepthIterator(int const depth=0)
Build a depth iterator starting at this node.
Definition: LightKDTreeNode.h:153
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
void swap(LightKDTreeNode &kdtn)
Swap attributes of given LightKDTreeNode and current LightKDTreeNode.
Definition: LightKDTreeNode.cpp:41
void serialize(Archive &ar, const unsigned int version)
Serialize a LightKDTreeNode to a stream of bytes.
Definition: LightKDTreeNode.h:40
virtual ~LightKDTreeNode()
Destructor for LightKDTreeNode.
Definition: LightKDTreeNode.h:103
LightKDTreeNode * getLeftChild() const override
Definition: LightKDTreeNode.h:137
int splitAxis
Space axis to consider at current depth.
Definition: LightKDTreeNode.h:78