Go to the documentation of this file.
20 #ifndef __OPC_TREEBUILDERS_H__
21 #define __OPC_TREEBUILDERS_H__
55 mNbInvalidSplits(0) {}
67 virtual bool ComputeGlobalBox(
const udword* primitives,
udword nb_prims,
AABB& global_box)
const = 0;
77 virtual float GetSplittingValue(
udword index,
udword axis)
const = 0;
89 virtual float GetSplittingValue(
const udword* primitives,
udword nb_prims,
const AABB& global_box,
udword axis)
const
104 virtual BOOL ValidateSubdivision(
const udword* primitives,
udword nb_prims,
const AABB& global_box)
108 if(nb_prims<=mSettings.mLimit)
return FALSE;
173 #endif // __OPC_TREEBUILDERS_H__
inline_ void SetNbInvalidSplits(udword nb)
AABBTreeOfTrianglesBuilder()
Constructor.
AABBTreeOfAABBsBuilder()
Constructor.
udword mNbPrimitives
Total number of primitives.
@ SPLIT_BALANCED
Try to keep a well-balanced tree.
unsigned int udword
sizeof(udword) must be 4
const AABB * mAABBArray
Shortcut to an app-controlled array of AABBs.
@ SPLIT_FIFTY
Arbitrary 50-50 split.
int BOOL
Another boolean type.
void * mNodeBase
Address of node pool [Opcode 1.3].
virtual ~AABBTreeOfVerticesBuilder()
Destructor.
@ SPLIT_GEOM_CENTER
Split at geometric center (else split in the middle)
inline_ void GetCenter(Point ¢er) const
Get box center.
inline_ udword GetNbInvalidSplits() const
inline_ udword GetCount() const
virtual float GetSplittingValue(udword index, udword axis) const =0
inline_ void IncreaseCount(udword nb)
virtual ~AABBTreeOfAABBsBuilder()
Destructor.
@ SPLIT_LARGEST_AXIS
Split along the largest axis.
virtual bool ComputeGlobalBox(const udword *primitives, udword nb_prims, AABB &global_box) const =0
BuildSettings mSettings
Splitting rules & split limit [Opcode 1.3].
@ SPLIT_SPLATTER_POINTS
Splatter primitive centers (QuickCD-style)
const Point * mVertexArray
Shortcut to an app-controlled array of vertices.
AABBTreeBuilder()
Constructor.
inline_ void IncreaseNbInvalidSplits()
udword mRules
Building/Splitting rules (a combination of SplittingRules flags)
udword mCount
Stats: number of nodes created.
udword mNbInvalidSplits
Stats: number of invalid splits.
AABBTreeOfVerticesBuilder()
Constructor.
virtual ~AABBTreeBuilder()
Destructor.
SplittingRules
Tree splitting rules.
@ SPLIT_BEST_AXIS
Try largest axis, then second, then last.
virtual ~AABBTreeOfTrianglesBuilder()
Destructor.
Simple wrapper around build-related settings [Opcode 1.3].
const MeshInterface * mIMesh
Shortcut to an app-controlled mesh interface.
#define null
our own NULL pointer
inline_ void SetCount(udword nb)
udword mLimit
Limit number of primitives / node. If limit is 1, build a complete tree (2*N-1 nodes)
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:04