The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes, through the btStridingMeshInterface. More...
#include <btOptimizedBvh.h>
Public Member Functions | |
BT_DECLARE_ALIGNED_ALLOCATOR () | |
btOptimizedBvh () | |
virtual | ~btOptimizedBvh () |
void | build (btStridingMeshInterface *triangles, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax) |
void | refit (btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax) |
void | refitPartial (btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax) |
void | updateBvhNodes (btStridingMeshInterface *meshInterface, int firstNode, int endNode, int index) |
virtual bool | serializeInPlace (void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const |
Data buffer MUST be 16 byte aligned. | |
Static Public Member Functions | |
static btOptimizedBvh * | deSerializeInPlace (void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian) |
deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place' |
The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes, through the btStridingMeshInterface.
Definition at line 27 of file btOptimizedBvh.h.
btOptimizedBvh::btOptimizedBvh | ( | ) |
Definition at line 23 of file btOptimizedBvh.cpp.
btOptimizedBvh::~btOptimizedBvh | ( | ) | [virtual] |
Definition at line 27 of file btOptimizedBvh.cpp.
btOptimizedBvh::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
Reimplemented from btQuantizedBvh.
void btOptimizedBvh::build | ( | btStridingMeshInterface * | triangles, | |
bool | useQuantizedAabbCompression, | |||
const btVector3 & | bvhAabbMin, | |||
const btVector3 & | bvhAabbMax | |||
) |
if the entire tree is small then subtree size, we need to create a header info for the tree
Definition at line 32 of file btOptimizedBvh.cpp.
btOptimizedBvh * btOptimizedBvh::deSerializeInPlace | ( | void * | i_alignedDataBuffer, | |
unsigned int | i_dataBufferSize, | |||
bool | i_swapEndian | |||
) | [static] |
deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'
Reimplemented from btQuantizedBvh.
Definition at line 385 of file btOptimizedBvh.cpp.
void btOptimizedBvh::refit | ( | btStridingMeshInterface * | triangles, | |
const btVector3 & | aabbMin, | |||
const btVector3 & | aabbMax | |||
) |
now update all subtree headers
Definition at line 206 of file btOptimizedBvh.cpp.
void btOptimizedBvh::refitPartial | ( | btStridingMeshInterface * | triangles, | |
const btVector3 & | aabbMin, | |||
const btVector3 & | aabbMax | |||
) |
we should update all quantization values, using updateBvhNodes(meshInterface); but we only update chunks that overlap the given aabb
Definition at line 233 of file btOptimizedBvh.cpp.
virtual bool btOptimizedBvh::serializeInPlace | ( | void * | o_alignedDataBuffer, | |
unsigned | i_dataBufferSize, | |||
bool | i_swapEndian | |||
) | const [inline, virtual] |
Data buffer MUST be 16 byte aligned.
Definition at line 50 of file btOptimizedBvh.h.
void btOptimizedBvh::updateBvhNodes | ( | btStridingMeshInterface * | meshInterface, | |
int | firstNode, | |||
int | endNode, | |||
int | index | |||
) |
Definition at line 272 of file btOptimizedBvh.cpp.