Helios++
Helios software for LiDAR simulations
|
Class representing a KDTree node. More...
#include <KDTreeNode.h>
Public Member Functions | |
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. | |
KDTreeNode & | operator= (KDTreeNode const &kdtn) |
Copy assignment operator for KDTreeNode. More... | |
KDTreeNode & | operator= (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... | |
![]() | |
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. | |
LightKDTreeNode & | operator= (LightKDTreeNode const &kdtn) |
Copy assignment operator for LightKDTreeNode. More... | |
LightKDTreeNode & | operator= (LightKDTreeNode &&kdtn) |
Move assignment operator for LightKDTreeNode. More... | |
void | swap (LightKDTreeNode &kdtn) |
Swap attributes of given LightKDTreeNode and current LightKDTreeNode. More... | |
LightKDTreeNode * | getLeftChild () const override |
LightKDTreeNode * | getRightChild () const override |
BinaryTreeDepthIterator< LightKDTreeNode > | buildDepthIterator (int const depth=0) |
Build a depth iterator starting at this node. More... | |
BinaryTreeFastDepthIterator< LightKDTreeNode > | buildFastDepthIterator () |
Build a fast depth iterator starting at this node. More... | |
BinaryTreeBreadthIterator< LightKDTreeNode > | buildBreadthIterator (int const depth=0) |
Build a breadth iterator starting at this node. More... | |
BinaryTreeFastBreadthIterator< LightKDTreeNode > | buildFastBreadthIterator () |
Build a fast breadth iterator starting at this node. More... | |
![]() | |
virtual bool | isLeafNode () const |
Check whether current node is a leaf node (true) or not (false) More... | |
Static Public Member Functions | |
static KDTreeNode * | readObject (std::string path) |
Import a serialized KDTree from file. More... | |
Public Attributes | |
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. | |
![]() | |
LightKDTreeNode * | left = nullptr |
Pointer to node at left side on space partition. Can be nullptr if there is no left side node. | |
LightKDTreeNode * | right = 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<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Serialize a KDTreeNode to a stream of bytes. More... | |
Friends | |
class | boost::serialization::access |
Class representing a KDTree node.
KDTreeNode::KDTreeNode | ( | KDTreeNode const & | kdtn | ) |
Copy constructor for KDTreeNode.
kdtn | KDTreeNode to be copy-constructed |
KDTreeNode::KDTreeNode | ( | KDTreeNode && | kdtn | ) |
Move constructor for KDTreeNode.
kdtn | KDTreeNode to be move-constructed |
KDTreeNode & KDTreeNode::operator= | ( | KDTreeNode && | kdtn | ) |
Move assignment operator for KDTreeNode.
kdtn | KDTreeNode to be move-assigned |
KDTreeNode & KDTreeNode::operator= | ( | KDTreeNode const & | kdtn | ) |
Copy assignment operator for KDTreeNode.
kdtn | KDTreeNode to be copy-assigned |
|
static |
Import a serialized KDTree from file.
path | Path to the file containing a serialized KDTree |
|
inlineprivate |
Serialize a KDTreeNode to a stream of bytes.
Archive | Type of rendering |
ar | Specific rendering for the stream of bytes |
version | Version number for the KDTreeNode |
void KDTreeNode::swap | ( | KDTreeNode & | kdtn | ) |
Swap attributes of given KDTreeNode and current KDTreeNode.
kdtn | KDTreeNode to swap attributes with |
void KDTreeNode::writeObject | ( | std::string | path | ) |
Serialize KDTree.
path | Path to file where the serialized KDTree must be exported |