aabbcc
|
A node of the AABB tree. More...
#include <AABB.h>
Public Member Functions | |
Node () | |
Constructor. | |
bool | isLeaf () const |
Test whether the node is a leaf. More... | |
Public Attributes | |
AABB | aabb |
The fattened axis-aligned bounding box. | |
unsigned int | parent |
Index of the parent node. | |
unsigned int | next |
Index of the next node. | |
unsigned int | left |
Index of the left-hand child. | |
unsigned int | right |
Index of the right-hand child. | |
int | height |
Height of the node. This is 0 for a leaf and -1 for a free node. | |
unsigned int | particle |
The index of the particle that the node contains (leaf nodes only). | |
A node of the AABB tree.
Each node of the tree contains an AABB object which corresponds to a particle, or a group of particles, in the simulation box. The AABB objects of individual particles are "fattened" before they are stored to avoid having to continually update and rebalance the tree when displacements are small.
Nodes are aware of their position within in the tree. The isLeaf member function allows the tree to query whether the node is a leaf, i.e. to determine whether it holds a single particle.
bool aabb::Node::isLeaf | ( | ) | const |
Test whether the node is a leaf.