diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2007-06-23 09:28:07 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2007-06-23 09:28:07 +0400 |
commit | ca26aeb7b23e37e65f49d907ea53fcaeee77ad4e (patch) | |
tree | b6530195a8ef5d874b9fc2bbb9574f1484781be5 /extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h | |
parent | 14ad8c9941ac1e6f5252a843c6ad17653cbbd689 (diff) |
upgrade to latest Bullet 2.53. cross the fingers it doesn't break one of the exotic or less exotic platforms
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h index 59a27e8641a..4914d9f959c 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -16,20 +16,26 @@ subject to the following restrictions: #ifndef BVH_TRIANGLE_MESH_SHAPE_H #define BVH_TRIANGLE_MESH_SHAPE_H -#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btOptimizedBvh.h" +#include "btTriangleMeshShape.h" +#include "btOptimizedBvh.h" ///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. -class btBvhTriangleMeshShape : public btTriangleMeshShape +ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape { btOptimizedBvh* m_bvh; - - + bool m_useQuantizedAabbCompression; + bool m_pad[12];////need padding due to alignment + public: - btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface); + btBvhTriangleMeshShape() :btTriangleMeshShape(0) {}; + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression); + + ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax); + virtual ~btBvhTriangleMeshShape(); @@ -44,6 +50,10 @@ public: virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + void refitTree(); + + ///for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks + void partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax); //debugging virtual char* getName()const {return "BVHTRIANGLEMESH";} @@ -51,8 +61,15 @@ public: virtual void setLocalScaling(const btVector3& scaling); - - -}; + btOptimizedBvh* getOptimizedBvh() + { + return m_bvh; + } + bool usesQuantizedAabbCompression() const + { + return m_useQuantizedAabbCompression; + } +} +; #endif //BVH_TRIANGLE_MESH_SHAPE_H |