Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AABBTreeNode Class Reference

#include <OPC_AABBTree.h>

Inheritance diagram for AABBTreeNode:
Inheritance graph
[legend]

Public Member Functions

inline_ udword GetNbPrimitives () const
 
const inline_ udwordGetPrimitives () const
 

Protected Member Functions

void _BuildHierarchy (AABBTreeBuilder *builder)
 
void _Refit (AABBTreeBuilder *builder)
 
udword Split (udword axis, AABBTreeBuilder *builder)
 
bool Subdivide (AABBTreeBuilder *builder)
 

Protected Attributes

udword mNbPrimitives
 Number of primitives for this node. More...
 
udwordmNodePrimitives
 Node-related primitives (shortcut to a position in mIndices below) More...
 

Detailed Description

Contains a generic AABB tree node.

Author
Pierre Terdiman
Version
1.3
Date
March, 20, 2001

Definition at line 83 of file OPC_AABBTree.h.

Member Function Documentation

◆ _BuildHierarchy()

void AABBTreeNode::_BuildHierarchy ( AABBTreeBuilder builder)
protected

Recursive hierarchy building in a top-down fashion.

Parameters
builder[in] the tree builder

Definition at line 333 of file OPC_AABBTree.cpp.

◆ _Refit()

void AABBTreeNode::_Refit ( AABBTreeBuilder builder)
protected

Refits the tree (top-down).

Parameters
builder[in] the tree builder

Definition at line 354 of file OPC_AABBTree.cpp.

◆ GetNbPrimitives()

inline_ udword AABBTreeNode::GetNbPrimitives ( ) const
inline

Definition at line 89 of file OPC_AABBTree.h.

◆ GetPrimitives()

const inline_ udword* AABBTreeNode::GetPrimitives ( ) const
inline

Definition at line 88 of file OPC_AABBTree.h.

◆ Split()

udword AABBTreeNode::Split ( udword  axis,
AABBTreeBuilder builder 
)
protected

Splits the node along a given axis. The list of indices is reorganized according to the split values.

Parameters
axis[in] splitting axis index
builder[in] the tree builder
Returns
the number of primitives assigned to the first child
Warning
this method reorganizes the internal list of primitives

Definition at line 99 of file OPC_AABBTree.cpp.

◆ Subdivide()

bool AABBTreeNode::Subdivide ( AABBTreeBuilder builder)
protected

Subdivides the node.

      N
    /   \
  /       \

N/2 N/2 / \ / \ N/4 N/4 N/4 N/4 (etc)

A well-balanced tree should have a O(log n) depth. A degenerate tree would have a O(n) depth. Note a perfectly-balanced tree is not well-suited to collision detection anyway.

Parameters
builder[in] the tree builder
Returns
true if success

Definition at line 150 of file OPC_AABBTree.cpp.

Member Data Documentation

◆ mNbPrimitives

udword AABBTreeNode::mNbPrimitives
protected

Number of primitives for this node.

Definition at line 94 of file OPC_AABBTree.h.

◆ mNodePrimitives

udword* AABBTreeNode::mNodePrimitives
protected

Node-related primitives (shortcut to a position in mIndices below)

Definition at line 93 of file OPC_AABBTree.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:05