Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <Opcode.h>
Public Member Functions | |
AABBTree () | |
~AABBTree () | |
bool | Build (AABBTreeBuilder *builder) |
void | Release () |
inline_ const udword * | GetIndices () const |
Catch the indices. More... | |
inline_ udword | GetNbNodes () const |
Catch the number of nodes. More... | |
bool | IsComplete () const |
udword | ComputeDepth () const |
udword | GetUsedBytes () const |
udword | Walk (WalkingCallback callback, void *user_data) const |
bool | Refit (AABBTreeBuilder *builder) |
bool | Refit2 (AABBTreeBuilder *builder) |
![]() | |
inline_ const udword * | GetPrimitives () const |
inline_ udword | GetNbPrimitives () const |
Additional Inherited Members | |
![]() | |
udword | Split (udword axis, AABBTreeBuilder *builder) |
bool | Subdivide (AABBTreeBuilder *builder) |
void | _BuildHierarchy (AABBTreeBuilder *builder) |
void | _Refit (AABBTreeBuilder *builder) |
![]() | |
udword * | mNodePrimitives |
Node-related primitives (shortcut to a position in mIndices below) More... | |
udword | mNbPrimitives |
Number of primitives for this node. More... | |
AABBTree::AABBTree | ( | ) |
Constructor.
Definition at line 374 of file OPC_AABBTree.cpp.
AABBTree::~AABBTree | ( | ) |
bool AABBTree::Build | ( | AABBTreeBuilder * | builder) |
Builds a generic AABB tree from a tree builder.
builder | [in] the tree builder |
Definition at line 406 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.
Definition at line 457 of file OPC_AABBTree.cpp.
udword AABBTree::GetUsedBytes | ( | ) | const |
Computes the number of bytes used by the tree.
Definition at line 557 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.
Definition at line 571 of file OPC_AABBTree.cpp.
bool AABBTree::Refit | ( | AABBTreeBuilder * | builder) |
Refits the tree in a top-down way.
builder | [in] the tree builder |
Definition at line 502 of file OPC_AABBTree.cpp.
bool AABBTree::Refit2 | ( | AABBTreeBuilder * | builder) |
Refits the tree in a bottom-up way.
builder | [in] the tree builder |
Definition at line 515 of file OPC_AABBTree.cpp.
void AABBTree::Release | ( | ) |
Releases the tree.
Definition at line 393 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 467 of file OPC_AABBTree.cpp.