Classes | Defines | Typedefs | Functions
btQuantizedBvh.h File Reference
#include "LinearMath/btVector3.h"
#include "LinearMath/btAlignedAllocator.h"
#include "LinearMath/btAlignedObjectArray.h"
Include dependency graph for btQuantizedBvh.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  btBvhSubtreeInfoData
class  btNodeOverlapCallback
struct  btOptimizedBvhNodeDoubleData
struct  btOptimizedBvhNodeFloatData
struct  btQuantizedBvhDoubleData
struct  btQuantizedBvhFloatData
struct  btQuantizedBvhNodeData

Defines

#define btOptimizedBvhNodeData   btOptimizedBvhNodeFloatData
#define btQuantizedBvhData   btQuantizedBvhFloatData
#define btQuantizedBvhDataName   "btQuantizedBvhFloatData"
#define MAX_NUM_PARTS_IN_BITS   10
#define MAX_SUBTREE_SIZE_IN_BYTES   2048

Typedefs

typedef btAlignedObjectArray
< btBvhSubtreeInfo > 
BvhSubtreeInfoArray
typedef btAlignedObjectArray
< btOptimizedBvhNode > 
NodeArray
 for code readability:
typedef btAlignedObjectArray
< btQuantizedBvhNode > 
QuantizedNodeArray

Functions

 ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode
 ATTRIBUTE_ALIGNED16 (class) btBvhSubtreeInfo
 btBvhSubtreeInfo provides info to gather a subtree of limited size

Define Documentation

Definition at line 40 of file btQuantizedBvh.h.

Definition at line 39 of file btQuantizedBvh.h.

#define btQuantizedBvhDataName   "btQuantizedBvhFloatData"

Definition at line 41 of file btQuantizedBvh.h.

#define MAX_NUM_PARTS_IN_BITS   10

Definition at line 54 of file btQuantizedBvh.h.

#define MAX_SUBTREE_SIZE_IN_BYTES   2048

Definition at line 50 of file btQuantizedBvh.h.


Typedef Documentation

typedef btAlignedObjectArray<btBvhSubtreeInfo> BvhSubtreeInfoArray

Definition at line 166 of file btQuantizedBvh.h.

typedef btAlignedObjectArray<btOptimizedBvhNode> NodeArray

for code readability:

Definition at line 164 of file btQuantizedBvh.h.

typedef btAlignedObjectArray<btQuantizedBvhNode> QuantizedNodeArray

Definition at line 165 of file btQuantizedBvh.h.


Function Documentation

ATTRIBUTE_ALIGNED16 ( struct  )

btQuantizedBvhNode is a compressed aabb node, 16 bytes. Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range).

btOptimizedBvhNode contains both internal and leaf node information. Total node size is 44 bytes / node. You can use the compressed version of 16 bytes.

Definition at line 58 of file btQuantizedBvh.h.

ATTRIBUTE_ALIGNED16 ( class  )

btBvhSubtreeInfo provides info to gather a subtree of limited size

Axis aligned box.

The btQuantizedBvh class stores an AABB tree that can be quickly traversed on CPU and Cell SPU. It is used by the btBvhTriangleMeshShape as midphase, and by the btMultiSapBroadphase. It is recommended to use quantization for better performance and lower memory requirements.

two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!) this might be refactored into a virtual, it is usually not calculated at run-time

tree traversal designed for small-memory processors like PS3 SPU

use the 16-byte stackless 'skipindex' node tree to do a recursive traversal

use the 16-byte stackless 'skipindex' node tree to do a recursive traversal

***************************************** expert/internal use only *************************

buildInternal is expert use only: assumes that setQuantizationValues and LeafNodeArray are initialized

***************************************** expert/internal use only *************************

Make sure rounding is done in a way that unQuantize(quantizeWithClamp(...)) is conservative end-points always set the first bit, so that they are sorted properly (so that neighbouring AABBs overlap properly)

Todo:
: double-check this

setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees.

Data buffer MUST be 16 byte aligned

deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'

fills the dataBuffer and returns the struct name (and 0 on failure)

Definition at line 117 of file btQuantizedBvh.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:31