btBvhTriangleMeshShape Class Reference

The btBvhTriangleMeshShape is a static-triangle mesh shape with several optimizations, such as bounding volume hierarchy and cache friendly traversal for PlayStation 3 Cell SPU. More...

#include <btBvhTriangleMeshShape.h>

Inheritance diagram for btBvhTriangleMeshShape:
Inheritance graph
[legend]
Collaboration diagram for btBvhTriangleMeshShape:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 btBvhTriangleMeshShape ()
 btBvhTriangleMeshShape (btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, bool buildBvh=true)
 Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization.
 btBvhTriangleMeshShape (btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax, bool buildBvh=true)
 optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb
virtual ~btBvhTriangleMeshShape ()
bool getOwnsBvh () const
void performRaycast (btTriangleCallback *callback, const btVector3 &raySource, const btVector3 &rayTarget)
void performConvexcast (btTriangleCallback *callback, const btVector3 &boxSource, const btVector3 &boxTarget, const btVector3 &boxMin, const btVector3 &boxMax)
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
void refitTree (const btVector3 &aabbMin, const btVector3 &aabbMax)
void partialRefitTree (const btVector3 &aabbMin, const btVector3 &aabbMax)
 for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks
virtual const char * getName () const
virtual void setLocalScaling (const btVector3 &scaling)
btOptimizedBvhgetOptimizedBvh ()
void setOptimizedBvh (btOptimizedBvh *bvh, const btVector3 &localScaling=btVector3(1, 1, 1))
void buildOptimizedBvh ()
bool usesQuantizedAabbCompression () const

Private Attributes

btOptimizedBvhm_bvh
bool m_useQuantizedAabbCompression
bool m_ownsBvh
bool m_pad [11]

Detailed Description

The btBvhTriangleMeshShape is a static-triangle mesh shape with several optimizations, such as bounding volume hierarchy and cache friendly traversal for PlayStation 3 Cell SPU.

It is recommended to enable useQuantizedAabbCompression for better memory usage. It takes a triangle mesh as input, for example a btTriangleMesh or btTriangleIndexVertexArray. The btBvhTriangleMeshShape class allows for triangle mesh deformations by a refit or partialRefit method. Instead of building the bounding volume hierarchy acceleration structure, it is also possible to serialize (save) and deserialize (load) the structure from disk. See Demos\ConcaveDemo\ConcavePhysicsDemo.cpp for an example.

Definition at line 28 of file btBvhTriangleMeshShape.h.


Constructor & Destructor Documentation

btBvhTriangleMeshShape::btBvhTriangleMeshShape (  )  [inline]

Definition at line 40 of file btBvhTriangleMeshShape.h.

btBvhTriangleMeshShape::btBvhTriangleMeshShape ( btStridingMeshInterface meshInterface,
bool  useQuantizedAabbCompression,
bool  buildBvh = true 
)

Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization.

Uses an interface to access the triangles to allow for sharing graphics/physics triangles.

Definition at line 23 of file btBvhTriangleMeshShape.cpp.

btBvhTriangleMeshShape::btBvhTriangleMeshShape ( btStridingMeshInterface meshInterface,
bool  useQuantizedAabbCompression,
const btVector3 bvhAabbMin,
const btVector3 bvhAabbMax,
bool  buildBvh = true 
)

optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb

Definition at line 42 of file btBvhTriangleMeshShape.cpp.

btBvhTriangleMeshShape::~btBvhTriangleMeshShape (  )  [virtual]

Definition at line 81 of file btBvhTriangleMeshShape.cpp.


Member Function Documentation

btBvhTriangleMeshShape::BT_DECLARE_ALIGNED_ALLOCATOR (  ) 
void btBvhTriangleMeshShape::buildOptimizedBvh (  ) 

m_localAabbMin/m_localAabbMax is already re-calculated in btTriangleMeshShape. We could just scale aabb, but this needs some more work

Definition at line 337 of file btBvhTriangleMeshShape.cpp.

virtual const char* btBvhTriangleMeshShape::getName (  )  const [inline, virtual]

Reimplemented from btTriangleMeshShape.

Reimplemented in btMultimaterialTriangleMeshShape.

Definition at line 66 of file btBvhTriangleMeshShape.h.

btOptimizedBvh* btBvhTriangleMeshShape::getOptimizedBvh (  )  [inline]

Definition at line 71 of file btBvhTriangleMeshShape.h.

bool btBvhTriangleMeshShape::getOwnsBvh (  )  const [inline]

Definition at line 48 of file btBvhTriangleMeshShape.h.

void btBvhTriangleMeshShape::partialRefitTree ( const btVector3 aabbMin,
const btVector3 aabbMax 
)

for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks

Definition at line 65 of file btBvhTriangleMeshShape.cpp.

void btBvhTriangleMeshShape::performConvexcast ( btTriangleCallback callback,
const btVector3 boxSource,
const btVector3 boxTarget,
const btVector3 boxMin,
const btVector3 boxMax 
)

Definition at line 159 of file btBvhTriangleMeshShape.cpp.

void btBvhTriangleMeshShape::performRaycast ( btTriangleCallback callback,
const btVector3 raySource,
const btVector3 rayTarget 
)

Definition at line 90 of file btBvhTriangleMeshShape.cpp.

void btBvhTriangleMeshShape::processAllTriangles ( btTriangleCallback callback,
const btVector3 aabbMin,
const btVector3 aabbMax 
) const [virtual]

Reimplemented from btTriangleMeshShape.

Definition at line 229 of file btBvhTriangleMeshShape.cpp.

void btBvhTriangleMeshShape::refitTree ( const btVector3 aabbMin,
const btVector3 aabbMax 
)

Definition at line 74 of file btBvhTriangleMeshShape.cpp.

void btBvhTriangleMeshShape::setLocalScaling ( const btVector3 scaling  )  [virtual]

Reimplemented from btTriangleMeshShape.

Definition at line 328 of file btBvhTriangleMeshShape.cpp.

void btBvhTriangleMeshShape::setOptimizedBvh ( btOptimizedBvh bvh,
const btVector3 localScaling = btVector3(1,1,1) 
)

Definition at line 352 of file btBvhTriangleMeshShape.cpp.

bool btBvhTriangleMeshShape::usesQuantizedAabbCompression (  )  const [inline]

Definition at line 81 of file btBvhTriangleMeshShape.h.


Member Data Documentation

Definition at line 31 of file btBvhTriangleMeshShape.h.

Definition at line 33 of file btBvhTriangleMeshShape.h.

bool btBvhTriangleMeshShape::m_pad[11] [private]

Definition at line 34 of file btBvhTriangleMeshShape.h.

Definition at line 32 of file btBvhTriangleMeshShape.h.


The documentation for this class was generated from the following files:

Generated on Mon Feb 15 22:21:53 2010 for Bullet Collision Detection & Physics Library by  doxygen 1.6.1