Classes | Macros | Typedefs
OPC_AABBTree.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AABBTree
 
class  AABBTreeNode
 

Macros

#define __OPC_AABBTREE_H__
 
#define EXWORD   udword
 
#define EXWORD   udword
 
#define IMPLEMENT_TREE(base_class, volume)
 
#define IMPLEMENT_TREE(base_class, volume)
 TO BE DOCUMENTED. More...
 

Typedefs

typedef void(* CullingCallback) (udword nb_primitives, udword *node_primitives, BOOL need_clipping, void *user_data)
 
typedef bool(* WalkingCallback) (const AABBTreeNode *current, udword depth, void *user_data)
 

Detailed Description

Contains code for a versatile AABB tree.

Author
Pierre Terdiman
Date
March, 20, 2001

Definition in file OPC_AABBTree.h.

Macro Definition Documentation

◆ __OPC_AABBTREE_H__

#define __OPC_AABBTREE_H__

Definition at line 22 of file Opcode.h.

◆ EXWORD [1/2]

#define EXWORD   udword

◆ EXWORD [2/2]

#define EXWORD   udword

Definition at line 27 of file Opcode.h.

◆ IMPLEMENT_TREE [1/2]

#define IMPLEMENT_TREE (   base_class,
  volume 
)
Value:
public: \
/* Constructor / Destructor */ \
base_class(); \
~base_class(); \
/* Data access */ \
inline_ const volume* Get##volume() const { return &mBV; } \
/* Clear the last bit */ \
inline_ const base_class* GetPos() const { return (const base_class*)(mPos&~1); } \
inline_ const base_class* GetNeg() const { const base_class* P = GetPos(); return P ? P+1 : null;} \
\
/* We don't need to test both nodes since we can't have one without the other */ \
inline_ bool IsLeaf() const { return !GetPos(); } \
\
/* Stats */ \
inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \
protected: \
/* Tree-independent data */ \
/* Following data always belong to the BV-tree, regardless of what the tree actually contains.*/ \
/* Whatever happens we need the two children and the enclosing volume.*/ \
volume mBV; /* Global bounding-volume enclosing all the node-related primitives */ \
EXWORD mPos; /* "Positive" & "Negative" children */
#define null
our own NULL pointer
Definition: IceTypes.h:57
#define SIZEOFOBJECT
Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
unsigned int udword
sizeof(udword) must be 4
Definition: IceTypes.h:65

◆ IMPLEMENT_TREE [2/2]

#define IMPLEMENT_TREE (   base_class,
  volume 
)
Value:
public: \
/* Constructor / Destructor */ \
base_class(); \
~base_class(); \
/* Data access */ \
inline_ const volume* Get##volume() const { return &mBV; } \
/* Clear the last bit */ \
inline_ const base_class* GetPos() const { return (const base_class*)(mPos&~1); } \
inline_ const base_class* GetNeg() const { return (const base_class*)(mNeg&~1); } \
\
/* inline_ bool IsLeaf() const { return (!GetPos() && !GetNeg()); } */ \
/* We don't need to test both nodes since we can't have one without the other */ \
inline_ bool IsLeaf() const { return !GetPos(); } \
\
/* Stats */ \
inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \
protected: \
/* Tree-independent data */ \
/* Following data always belong to the BV-tree, regardless of what the tree actually contains.*/ \
/* Whatever happens we need the two children and the enclosing volume.*/ \
volume mBV; /* Global bounding-volume enclosing all the node-related primitives */ \
EXWORD mPos; /* "Positive" child */ \
EXOWRD mNeg; /* "Negative" child */
#define SIZEOFOBJECT
Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
unsigned int udword
sizeof(udword) must be 4
Definition: IceTypes.h:65

TO BE DOCUMENTED.

Definition at line 32 of file Opcode.h.

Typedef Documentation

◆ CullingCallback

typedef void(* CullingCallback) (udword nb_primitives, udword *node_primitives, BOOL need_clipping, void *user_data)

Definition at line 81 of file OPC_AABBTree.h.

◆ WalkingCallback

typedef bool(* WalkingCallback) (const AABBTreeNode *current, udword depth, void *user_data)

User-callback, called for each node by the walking code.

Parameters
current[in] current node
depth[in] current node's depth
user_data[in] user-defined data
Returns
true to recurse through children, else false to bypass them

Definition at line 111 of file OPC_AABBTree.h.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:06