PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
pbat::geometry::KdTreeNode Struct Reference

Node of a KDTree. More...

#include <KdTree.h>

Public Types

enum  { kLeafNodeLeftChild = -2 }
 

Public Member Functions

bool IsLeaf () const
 Returns true if this node is a leaf node, false otherwise.
 
bool IsInternal () const
 Returns true if this node is an internal node, false otherwise.
 
auto Left () const
 Returns left child node.
 
auto Right () const
 Returns right child node.
 

Public Attributes

Index begin
 Index to first point encapsulated in this node's AABB in the permutation list.
 
Index n
 
Index c {kLeafNodeLeftChild}
 

Detailed Description

Node of a KDTree.

Member Function Documentation

◆ IsInternal()

bool pbat::geometry::KdTreeNode::IsInternal ( ) const
inline

Returns true if this node is an internal node, false otherwise.

Returns
true if this node is an internal node, false otherwise

◆ IsLeaf()

bool pbat::geometry::KdTreeNode::IsLeaf ( ) const
inline

Returns true if this node is a leaf node, false otherwise.

Returns
true if this node is a leaf node, false otherwise

◆ Left()

auto pbat::geometry::KdTreeNode::Left ( ) const
inline

Returns left child node.

Returns
Index of left child node

◆ Right()

auto pbat::geometry::KdTreeNode::Right ( ) const
inline

Returns right child node.

Returns
Index of right child node

Member Data Documentation

◆ c

Index pbat::geometry::KdTreeNode::c {kLeafNodeLeftChild}

Index of first (i.e. left) child. < 0 if no child. We set to -2 so that Left() < 0 and Right() < 0 if leaf node.

◆ n

Index pbat::geometry::KdTreeNode::n

Number of points encapsulated in this node's AABB starting from begin and continuing in contiguous memory in the permutation list until begin + n.


The documentation for this struct was generated from the following file: