#include <Opcode.h>
Public Member Functions | |
AABBTreeBuilder () | |
Constructor. | |
virtual bool | ComputeGlobalBox (const udword *primitives, udword nb_prims, AABB &global_box) const =0 |
inline_ udword | GetCount () const |
inline_ udword | GetNbInvalidSplits () const |
virtual float | GetSplittingValue (udword index, udword axis) const =0 |
virtual float | GetSplittingValue (const udword *primitives, udword nb_prims, const AABB &global_box, udword axis) const |
inline_ void | IncreaseCount (udword nb) |
inline_ void | IncreaseNbInvalidSplits () |
inline_ void | SetCount (udword nb) |
inline_ void | SetNbInvalidSplits (udword nb) |
virtual BOOL | ValidateSubdivision (const udword *primitives, udword nb_prims, const AABB &global_box) |
virtual | ~AABBTreeBuilder () |
Destructor. | |
Public Attributes | |
udword | mNbPrimitives |
Total number of primitives. | |
void * | mNodeBase |
Address of node pool [Opcode 1.3]. | |
BuildSettings | mSettings |
Splitting rules & split limit [Opcode 1.3]. | |
Private Attributes | |
udword | mCount |
Stats: number of nodes created. | |
udword | mNbInvalidSplits |
Stats: number of invalid splits. |
Opcode::AABBTreeBuilder::AABBTreeBuilder | ( | ) | [inline] |
virtual Opcode::AABBTreeBuilder::~AABBTreeBuilder | ( | ) | [inline, virtual] |
virtual bool Opcode::AABBTreeBuilder::ComputeGlobalBox | ( | const udword * | primitives, |
udword | nb_prims, | ||
AABB & | global_box | ||
) | const [pure virtual] |
inline_ udword Opcode::AABBTreeBuilder::GetCount | ( | ) | const [inline] |
inline_ udword Opcode::AABBTreeBuilder::GetNbInvalidSplits | ( | ) | const [inline] |
virtual float Opcode::AABBTreeBuilder::GetSplittingValue | ( | udword | index, |
udword | axis | ||
) | const [pure virtual] |
Computes the splitting value along a given axis for a given primitive.
index | [in] index of the primitive to split |
axis | [in] axis index (0,1,2) |
virtual float Opcode::AABBTreeBuilder::GetSplittingValue | ( | const udword * | primitives, |
udword | nb_prims, | ||
const AABB & | global_box, | ||
udword | axis | ||
) | const [inline, virtual] |
Computes the splitting value along a given axis for a given node.
primitives | [in] list of indices of primitives |
nb_prims | [in] number of indices |
global_box | [in] global AABB enclosing the set of input primitives |
axis | [in] axis index (0,1,2) |
inline_ void Opcode::AABBTreeBuilder::IncreaseCount | ( | udword | nb | ) | [inline] |
inline_ void Opcode::AABBTreeBuilder::IncreaseNbInvalidSplits | ( | ) | [inline] |
inline_ void Opcode::AABBTreeBuilder::SetCount | ( | udword | nb | ) | [inline] |
inline_ void Opcode::AABBTreeBuilder::SetNbInvalidSplits | ( | udword | nb | ) | [inline] |
virtual BOOL Opcode::AABBTreeBuilder::ValidateSubdivision | ( | const udword * | primitives, |
udword | nb_prims, | ||
const AABB & | global_box | ||
) | [inline, virtual] |
Validates node subdivision. This is called each time a node is considered for subdivision, during tree building.
primitives | [in] list of indices of primitives |
nb_prims | [in] number of indices |
global_box | [in] global AABB enclosing the set of input primitives |
udword Opcode::AABBTreeBuilder::mCount [private] |