Helios++
Helios software for LiDAR simulations
LightKDTreeNode Class Reference

Class representing a light KDTree node. It is, the basic representation of a KDTree node with uses least possible data. More...

#include <LightKDTreeNode.h>

Inheritance diagram for LightKDTreeNode:
Collaboration diagram for LightKDTreeNode:

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.
 
LightKDTreeNodeoperator= (LightKDTreeNode const &kdtn)
 Copy assignment operator for LightKDTreeNode. More...
 
LightKDTreeNodeoperator= (LightKDTreeNode &&kdtn)
 Move assignment operator for LightKDTreeNode. More...
 
void swap (LightKDTreeNode &kdtn)
 Swap attributes of given LightKDTreeNode and current LightKDTreeNode. More...
 
LightKDTreeNodegetLeftChild () const override
 
LightKDTreeNodegetRightChild () const override
 
BinaryTreeDepthIterator< LightKDTreeNodebuildDepthIterator (int const depth=0)
 Build a depth iterator starting at this node. More...
 
BinaryTreeFastDepthIterator< LightKDTreeNodebuildFastDepthIterator ()
 Build a fast depth iterator starting at this node. More...
 
BinaryTreeBreadthIterator< LightKDTreeNodebuildBreadthIterator (int const depth=0)
 Build a breadth iterator starting at this node. More...
 
BinaryTreeFastBreadthIterator< LightKDTreeNodebuildFastBreadthIterator ()
 Build a fast breadth iterator starting at this node. More...
 
- Public Member Functions inherited from IBinaryTreeNode
virtual bool isLeafNode () const
 Check whether current node is a leaf node (true) or not (false) More...
 

Public Attributes

LightKDTreeNodeleft = nullptr
 Pointer to node at left side on space partition. Can be nullptr if there is no left side node.
 
LightKDTreeNoderight = 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
 

Detailed Description

Class representing a light KDTree node. It is, the basic representation of a KDTree node with uses least possible data.

Constructor & Destructor Documentation

◆ LightKDTreeNode() [1/2]

LightKDTreeNode::LightKDTreeNode ( LightKDTreeNode const &  kdtn)

Copy constructor for LightKDTreeNode.

Parameters
kdtnLightKDTreeNode to be copy-constructed

◆ LightKDTreeNode() [2/2]

LightKDTreeNode::LightKDTreeNode ( LightKDTreeNode &&  kdtn)

Move constructor for LightKDTreeNode.

Parameters
kdtnLightKDTreeNode to be move-constructed

Member Function Documentation

◆ buildBreadthIterator()

BinaryTreeBreadthIterator<LightKDTreeNode> LightKDTreeNode::buildBreadthIterator ( int const  depth = 0)
inline

Build a breadth iterator starting at this node.

Returns
Breadth iterator starting at this node
See also
BinaryTreeBreadthIterator

◆ buildDepthIterator()

BinaryTreeDepthIterator<LightKDTreeNode> LightKDTreeNode::buildDepthIterator ( int const  depth = 0)
inline

Build a depth iterator starting at this node.

Returns
Depth iterator starting at this node
See also
BinaryTreeDepthIterator

◆ buildFastBreadthIterator()

BinaryTreeFastBreadthIterator<LightKDTreeNode> LightKDTreeNode::buildFastBreadthIterator ( )
inline

Build a fast breadth iterator starting at this node.

Returns
Fast breadth iterator starting at this node
See also
BinaryTreeFastBreadthIterator

◆ buildFastDepthIterator()

BinaryTreeFastDepthIterator<LightKDTreeNode> LightKDTreeNode::buildFastDepthIterator ( )
inline

Build a fast depth iterator starting at this node.

Returns
Fast depth iterator starting at this node
See also
BinaryTreeFastDepthIterator

◆ getLeftChild()

LightKDTreeNode* LightKDTreeNode::getLeftChild ( ) const
inlineoverridevirtual
See also
IBinaryTree::getLeftChild

Implements IBinaryTreeNode.

◆ getRightChild()

LightKDTreeNode* LightKDTreeNode::getRightChild ( ) const
inlineoverridevirtual
See also
IBinaryTree::getRightChild

Implements IBinaryTreeNode.

◆ operator=() [1/2]

LightKDTreeNode & LightKDTreeNode::operator= ( LightKDTreeNode &&  kdtn)

Move assignment operator for LightKDTreeNode.

Parameters
kdtnLightKDTreeNode to be move-assigned
Returns
Reference to moved LightKDTreeNode

◆ operator=() [2/2]

LightKDTreeNode & LightKDTreeNode::operator= ( LightKDTreeNode const &  kdtn)

Copy assignment operator for LightKDTreeNode.

Parameters
kdtnLightKDTreeNode to be copy-assigned
Returns
Reference to copied LightKDTreeNode

◆ serialize()

template<class Archive >
void LightKDTreeNode::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a LightKDTreeNode to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of byes
versionVersion number for the LightKDTreeNode

◆ swap()

void LightKDTreeNode::swap ( LightKDTreeNode kdtn)

Swap attributes of given LightKDTreeNode and current LightKDTreeNode.

Parameters
kdtnLightKDTreeNode to swap attributes with

Member Data Documentation

◆ right

LightKDTreeNode* LightKDTreeNode::right = nullptr

@biref Pointer to node at right side on space partition. Can be nullptr if there is no right side node


The documentation for this class was generated from the following files: