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

Go to the source code of this file.

Classes

class  AABBCollisionNode
 
class  AABBCollisionTree
 
class  AABBNoLeafNode
 
class  AABBNoLeafTree
 
class  AABBOptimizedTree
 
class  AABBQuantizedNode
 
class  AABBQuantizedNoLeafNode
 
class  AABBQuantizedNoLeafTree
 
class  AABBQuantizedTree
 

Macros

#define EXWORD   udword
 
#define IMPLEMENT_COLLISION_TREE(base_class, node)
 Common interface for a collision tree. More...
 
#define IMPLEMENT_IMPLICIT_NODE(base_class, volume)
 Common interface for a node of an implicit tree. More...
 
#define IMPLEMENT_NOLEAF_NODE(base_class, volume)
 Common interface for a node of a no-leaf tree. More...
 

Typedefs

typedef bool(* GenericWalkingCallback) (const void *current, void *user_data)
 

Detailed Description

Contains code for optimized trees.

Author
Pierre Terdiman
Date
March, 20, 2001

Definition in file OPC_OptimizedTree.h.

Macro Definition Documentation

◆ EXWORD

#define EXWORD   udword

Definition at line 26 of file OPC_OptimizedTree.h.

◆ IMPLEMENT_COLLISION_TREE

#define IMPLEMENT_COLLISION_TREE (   base_class,
  node 
)
Value:
public: \
/* Constructor / Destructor */ \
base_class(); \
virtual ~base_class(); \
/* Builds from a standard tree */ \
override(AABBOptimizedTree) bool Build(AABBTree* tree); \
/* Refits the tree */ \
override(AABBOptimizedTree) bool Refit(const MeshInterface* mesh_interface); \
/* Walks the tree */ \
override(AABBOptimizedTree) bool Walk(GenericWalkingCallback callback, void* user_data) const; \
/* Data access */ \
inline_ const node* GetNodes() const { return mNodes; } \
/* Stats */ \
override(AABBOptimizedTree) udword GetUsedBytes() const { return mNbNodes*sizeof(node); } \
private: \
node* mNodes;

Common interface for a collision tree.

Definition at line 127 of file OPC_OptimizedTree.h.

◆ IMPLEMENT_IMPLICIT_NODE

#define IMPLEMENT_IMPLICIT_NODE (   base_class,
  volume 
)
Value:
public: \
/* Constructor / Destructor */ \
inline_ base_class() : mData(0) {} \
inline_ ~base_class() {} \
/* Leaf test */ \
inline_ BOOL IsLeaf() const { return mData&1; } \
/* Data access */ \
inline_ const base_class* GetPos() const { return (base_class*)mData; } \
inline_ const base_class* GetNeg() const { return ((base_class*)mData)+1; } \
/* Modified by S-cubed, Inc. */ \
inline_ const base_class* GetB() const { return mB; } \
inline_ udword GetPrimitive() const { return (mData>>1); } \
/* Stats */ \
inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \
\
volume mAABB; \
EXWORD mData; \
/* Modified by S-cubed, Inc. */ \
base_class* mB;

Common interface for a node of an implicit tree.

Definition at line 30 of file OPC_OptimizedTree.h.

◆ IMPLEMENT_NOLEAF_NODE

#define IMPLEMENT_NOLEAF_NODE (   base_class,
  volume 
)
Value:
public: \
/* Constructor / Destructor */ \
inline_ base_class() : mPosData(0), mNegData(0) {} \
inline_ ~base_class() {} \
/* Leaf tests */ \
inline_ BOOL HasPosLeaf() const { return mPosData&1; } \
inline_ BOOL HasNegLeaf() const { return mNegData&1; } \
/* Data access */ \
inline_ const base_class* GetPos() const { return (base_class*)mPosData; } \
inline_ const base_class* GetNeg() const { return (base_class*)mNegData; } \
/* Modified by S-cubed, Inc. */ \
inline_ const base_class* GetB() const { return mB; } \
inline_ udword GetPosPrimitive() const { return (mPosData>>1); } \
inline_ udword GetNegPrimitive() const { return (mNegData>>1); } \
/* Stats */ \
inline_ udword GetNodeSize() const { return SIZEOFOBJECT; } \
\
volume mAABB; \
EXWORD mPosData; \
EXWORD mNegData; \
/* Modified by S-cubed, Inc. */ \
base_class* mB;

Common interface for a node of a no-leaf tree.

Definition at line 52 of file OPC_OptimizedTree.h.

Typedef Documentation

◆ GenericWalkingCallback

typedef bool(* GenericWalkingCallback) (const void *current, void *user_data)

Definition at line 145 of file OPC_OptimizedTree.h.

GenericWalkingCallback
bool(* GenericWalkingCallback)(const void *current, void *user_data)
Definition: OPC_OptimizedTree.h:145
SIZEOFOBJECT
#define SIZEOFOBJECT
Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
Definition: IceMemoryMacros.h:93
udword
unsigned int udword
sizeof(udword) must be 4
Definition: IceTypes.h:65
BOOL
int BOOL
Another boolean type.
Definition: IceTypes.h:102
AABBTree
Definition: OPC_AABBTree.h:113
AABBOptimizedTree
Definition: OPC_OptimizedTree.h:147
MeshInterface
Definition: OPC_MeshInterface.h:53


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:05