Helios++
Helios software for LiDAR simulations
|
Class representing a light KDTree node. It is, the basic representation of a KDTree node with uses least possible data. More...
#include <LightKDTreeNode.h>
Public Member Functions | |
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... | |
Public Attributes | |
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 LightKDTreeNode to a stream of bytes. More... | |
Friends | |
class | boost::serialization::access |
Class representing a light KDTree node. It is, the basic representation of a KDTree node with uses least possible data.
LightKDTreeNode::LightKDTreeNode | ( | LightKDTreeNode const & | kdtn | ) |
Copy constructor for LightKDTreeNode.
kdtn | LightKDTreeNode to be copy-constructed |
LightKDTreeNode::LightKDTreeNode | ( | LightKDTreeNode && | kdtn | ) |
Move constructor for LightKDTreeNode.
kdtn | LightKDTreeNode to be move-constructed |
|
inline |
Build a breadth iterator starting at this node.
|
inline |
Build a depth iterator starting at this node.
|
inline |
Build a fast breadth iterator starting at this node.
|
inline |
Build a fast depth iterator starting at this node.
|
inlineoverridevirtual |
Implements IBinaryTreeNode.
|
inlineoverridevirtual |
Implements IBinaryTreeNode.
LightKDTreeNode & LightKDTreeNode::operator= | ( | LightKDTreeNode && | kdtn | ) |
Move assignment operator for LightKDTreeNode.
kdtn | LightKDTreeNode to be move-assigned |
LightKDTreeNode & LightKDTreeNode::operator= | ( | LightKDTreeNode const & | kdtn | ) |
Copy assignment operator for LightKDTreeNode.
kdtn | LightKDTreeNode to be copy-assigned |
|
inlineprivate |
Serialize a LightKDTreeNode to a stream of bytes.
Archive | Type of rendering |
ar | Specific rendering for the stream of byes |
version | Version number for the LightKDTreeNode |
void LightKDTreeNode::swap | ( | LightKDTreeNode & | kdtn | ) |
Swap attributes of given LightKDTreeNode and current LightKDTreeNode.
kdtn | LightKDTreeNode to swap attributes with |
LightKDTreeNode* LightKDTreeNode::right = nullptr |
@biref Pointer to node at right side on space partition. Can be nullptr if there is no right side node