Public Member Functions | Private Attributes | List of all members
Opcode::AABBTree Class Reference

#include <Opcode.h>

Inheritance diagram for Opcode::AABBTree:
Inheritance graph
[legend]

Public Member Functions

 AABBTree ()
 
bool Build (AABBTreeBuilder *builder)
 
udword ComputeDepth () const
 
inline_ const udwordGetIndices () const
 Catch the indices. More...
 
inline_ udword GetNbNodes () const
 Catch the number of nodes. More...
 
udword GetUsedBytes () const
 
bool IsComplete () const
 
bool Refit (AABBTreeBuilder *builder)
 
bool Refit2 (AABBTreeBuilder *builder)
 
void Release ()
 
udword Walk (WalkingCallback callback, void *user_data) const
 
 ~AABBTree ()
 
- Public Member Functions inherited from Opcode::AABBTreeNode
inline_ udword GetNbPrimitives () const
 
inline_ const udwordGetPrimitives () const
 

Private Attributes

udwordmIndices
 Indices in the app list. Indices are reorganized during build (permutation). More...
 
AABBTreeNodemPool
 Linear pool of nodes for complete trees. Null otherwise. [Opcode 1.3]. More...
 
udword mTotalNbNodes
 Number of nodes in the tree. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Opcode::AABBTreeNode
void _BuildHierarchy (AABBTreeBuilder *builder)
 
void _Refit (AABBTreeBuilder *builder)
 
udword Split (udword axis, AABBTreeBuilder *builder)
 
bool Subdivide (AABBTreeBuilder *builder)
 
- Protected Attributes inherited from Opcode::AABBTreeNode
udword mNbPrimitives
 Number of primitives for this node. More...
 
udwordmNodePrimitives
 Node-related primitives (shortcut to a position in mIndices below) More...
 

Detailed Description

Definition at line 114 of file Opcode.h.

Constructor & Destructor Documentation

AABBTree::AABBTree ( )

Constructor.

Definition at line 373 of file OPC_AABBTree.cpp.

AABBTree::~AABBTree ( )

Destructor.

Definition at line 382 of file OPC_AABBTree.cpp.

Member Function Documentation

bool AABBTree::Build ( AABBTreeBuilder builder)

Builds a generic AABB tree from a tree builder.

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

Definition at line 405 of file OPC_AABBTree.cpp.

udword AABBTree::ComputeDepth ( ) const

Computes the depth of the tree. A well-balanced tree should have a log(n) depth. A degenerate tree O(n) depth.

Returns
depth of the tree

Definition at line 456 of file OPC_AABBTree.cpp.

inline_ const udword* Opcode::AABBTree::GetIndices ( ) const
inline

Catch the indices.

Definition at line 125 of file Opcode.h.

inline_ udword Opcode::AABBTree::GetNbNodes ( ) const
inline

Catch the number of nodes.

Definition at line 126 of file Opcode.h.

udword AABBTree::GetUsedBytes ( ) const

Computes the number of bytes used by the tree.

Returns
number of bytes used

Definition at line 556 of file OPC_AABBTree.cpp.

bool AABBTree::IsComplete ( ) const

Checks the tree is a complete tree or not. A complete tree is made of 2*N-1 nodes, where N is the number of primitives in the tree.

Returns
true for complete trees

Definition at line 570 of file OPC_AABBTree.cpp.

bool AABBTree::Refit ( AABBTreeBuilder builder)

Refits the tree in a top-down way.

Parameters
builder[in] the tree builder

Definition at line 501 of file OPC_AABBTree.cpp.

bool AABBTree::Refit2 ( AABBTreeBuilder builder)

Refits the tree in a bottom-up way.

Parameters
builder[in] the tree builder

Definition at line 514 of file OPC_AABBTree.cpp.

void AABBTree::Release ( )

Releases the tree.

Definition at line 392 of file OPC_AABBTree.cpp.

udword AABBTree::Walk ( WalkingCallback  callback,
void user_data 
) const

Walks the tree, calling the user back for each node.

Definition at line 466 of file OPC_AABBTree.cpp.

Member Data Documentation

udword* Opcode::AABBTree::mIndices
private

Indices in the app list. Indices are reorganized during build (permutation).

Definition at line 138 of file Opcode.h.

AABBTreeNode* Opcode::AABBTree::mPool
private

Linear pool of nodes for complete trees. Null otherwise. [Opcode 1.3].

Definition at line 139 of file Opcode.h.

udword Opcode::AABBTree::mTotalNbNodes
private

Number of nodes in the tree.

Definition at line 141 of file Opcode.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 Sat May 8 2021 02:42:45