Back to index

supertuxkart  0.5+dfsg1
Functions
btBvhTriangleMeshShape.h File Reference
#include "btTriangleMeshShape.h"
#include "btOptimizedBvh.h"
#include "LinearMath/btAlignedAllocator.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 ATTRIBUTE_ALIGNED16 (class) btBvhTriangleMeshShape
 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.

Function Documentation

ATTRIBUTE_ALIGNED16 ( class  )

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.

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

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 26 of file btBvhTriangleMeshShape.h.

                                                  : public btTriangleMeshShape
{

       btOptimizedBvh*      m_bvh;
       bool m_useQuantizedAabbCompression;
       bool m_ownsBvh;
       bool m_pad[11];

public:

       BT_DECLARE_ALIGNED_ALLOCATOR();

       btBvhTriangleMeshShape() :btTriangleMeshShape(0),m_bvh(0),m_ownsBvh(false) {};
       btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true);

       btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax, bool buildBvh = true);
       
       virtual ~btBvhTriangleMeshShape();

       virtual int   getShapeType() const
       {
              return TRIANGLE_MESH_SHAPE_PROXYTYPE;
       }
       
       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);

       //debugging
       virtual const char*  getName()const {return "BVHTRIANGLEMESH";}


       virtual void  setLocalScaling(const btVector3& scaling);
       
       btOptimizedBvh*      getOptimizedBvh()
       {
              return m_bvh;
       }


       void   setOptimizedBvh(btOptimizedBvh* bvh)
       {
              btAssert(!m_bvh);
              btAssert(!m_ownsBvh);

              m_bvh = bvh;
              m_ownsBvh = false;
       }

       bool   usesQuantizedAabbCompression() const
       {
              return m_useQuantizedAabbCompression;
       }
}