20 #ifndef __OPC_AABBTREE_H__ 21 #define __OPC_AABBTREE_H__ 23 #if (defined __x86_64) || (defined __aarch64__) 29 #ifdef OPC_NO_NEG_VANILLA_TREE 30 #define IMPLEMENT_TREE(base_class, volume) \ 37 inline_ const volume* Get##volume() const { return &mBV; } \ 39 inline_ const base_class* GetPos() const { return (const base_class*)(mPos&~1); } \ 40 inline_ const base_class* GetNeg() const { const base_class* P = GetPos(); return P ? P+1 : null;} \ 43 inline_ bool IsLeaf() const { return !GetPos(); } \ 46 inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \ 54 #define IMPLEMENT_TREE(base_class, volume) \ 61 inline_ const volume* Get##volume() const { return &mBV; } \ 63 inline_ const base_class* GetPos() const { return (const base_class*)(mPos&~1); } \ 64 inline_ const base_class* GetNeg() const { return (const base_class*)(mNeg&~1); } \ 68 inline_ bool IsLeaf() const { return !GetPos(); } \ 71 inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \ 128 bool IsComplete()
const;
130 udword ComputeDepth()
const;
131 udword GetUsedBytes()
const;
143 #endif // __OPC_AABBTREE_H__ AABBTreeNode * mPool
Linear pool of nodes for complete trees. Null otherwise. [Opcode 1.3].
inline_ udword GetNbPrimitives() const
#define IMPLEMENT_TREE(base_class, volume)
TO BE DOCUMENTED.
void(* CullingCallback)(udword nb_primitives, udword *node_primitives, BOOL need_clipping, void *user_data)
udword * mNodePrimitives
Node-related primitives (shortcut to a position in mIndices below)
inline_ const udword * GetIndices() const
Catch the indices.
int BOOL
Another boolean type.
inline_ const udword * GetPrimitives() const
udword mNbPrimitives
Number of primitives for this node.
inline_ udword GetNbNodes() const
Catch the number of nodes.
udword mTotalNbNodes
Number of nodes in the tree.
unsigned int udword
sizeof(udword) must be 4
udword * mIndices
Indices in the app list. Indices are reorganized during build (permutation).
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp
bool(* WalkingCallback)(const AABBTreeNode *current, udword depth, void *user_data)