diff options
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h index d7b354b7855..85020dd3f58 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef STRIDING_MESHINTERFACE_H #define STRIDING_MESHINTERFACE_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btTriangleCallback.h" /// PHY_ScalarType enumerates possible scalar types. @@ -29,7 +29,8 @@ typedef enum PHY_ScalarType { PHY_FIXEDPOINT88 } PHY_ScalarType; -/// btStridingMeshInterface is the interface class for high performance access to triangle meshes +/// The btStridingMeshInterface is the interface class for high performance generic access to triangle meshes, used in combination with btBvhTriangleMeshShape and some other collision shapes. +/// Using index striding of 3*sizeof(integer) it can use triangle arrays, using index striding of 1*sizeof(integer) it can handle triangle strips. /// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory. class btStridingMeshInterface { @@ -47,7 +48,7 @@ class btStridingMeshInterface - void InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + virtual void InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; ///brute force method to calculate aabb void calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax); @@ -75,6 +76,10 @@ class btStridingMeshInterface virtual void preallocateVertices(int numverts)=0; virtual void preallocateIndices(int numindices)=0; + virtual bool hasPremadeAabb() const { return false; } + virtual void setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) const {} + virtual void getPremadeAabb(btVector3* aabbMin, btVector3* aabbMax ) const {} + const btVector3& getScaling() const { return m_scaling; } @@ -83,6 +88,7 @@ class btStridingMeshInterface m_scaling = scaling; } + }; |