diff options
Diffstat (limited to 'extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h')
-rw-r--r-- | extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h index 05431cfce15..90015bb9ac0 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h @@ -189,7 +189,7 @@ public: //!@{ //! Base method for determinig which kind of GIMPACT shape we get - virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() = 0; + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const = 0 ; //! gets boxset SIMD_FORCE_INLINE btGImpactBoxSet * getBoxSet() @@ -276,6 +276,7 @@ public: //! virtual method for ray collision virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const { + (void) rayFrom; (void) rayTo; (void) resultCallback; } //! Function for retrieve triangles. @@ -284,6 +285,7 @@ public: */ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const { + (void) callback; (void) aabbMin; (void) aabbMax; } //!@} @@ -302,10 +304,12 @@ public: class CompoundPrimitiveManager:public btPrimitiveManagerBase { public: + virtual ~CompoundPrimitiveManager() {} btGImpactCompoundShape * m_compoundShape; CompoundPrimitiveManager(const CompoundPrimitiveManager& compound) + : btPrimitiveManagerBase() { m_compoundShape = compound.m_compoundShape; } @@ -348,6 +352,7 @@ public: virtual void get_primitive_triangle(int prim_index,btPrimitiveTriangle & triangle) const { btAssert(0); + (void) prim_index; (void) triangle; } }; @@ -364,6 +369,7 @@ public: btGImpactCompoundShape(bool children_has_transform = true) { + (void) children_has_transform; m_primitive_manager.m_compoundShape = this; m_box_set.setPrimitiveManager(&m_primitive_manager); } @@ -477,11 +483,13 @@ public: virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const { + (void) prim_index; (void) triangle; btAssert(0); } virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const { + (void) prim_index; (void) tetrahedron; btAssert(0); } @@ -494,7 +502,7 @@ public: return "GImpactCompound"; } - virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const { return CONST_GIMPACT_COMPOUND_SHAPE; } @@ -550,6 +558,7 @@ public: } TrimeshPrimitiveManager(const TrimeshPrimitiveManager & manager) + : btPrimitiveManagerBase() { m_meshInterface = manager.m_meshInterface; m_part = manager.m_part; @@ -582,6 +591,7 @@ public: } + virtual ~TrimeshPrimitiveManager() {} void lock() { @@ -746,6 +756,7 @@ public: //! Gets the children virtual btCollisionShape* getChildShape(int index) { + (void) index; btAssert(0); return NULL; } @@ -755,6 +766,7 @@ public: //! Gets the child virtual const btCollisionShape* getChildShape(int index) const { + (void) index; btAssert(0); return NULL; } @@ -762,6 +774,7 @@ public: //! Gets the children transform virtual btTransform getChildTransform(int index) const { + (void) index; btAssert(0); return btTransform(); } @@ -772,6 +785,8 @@ public: */ virtual void setChildTransform(int index, const btTransform & transform) { + (void) index; + (void) transform; btAssert(0); } @@ -801,7 +816,7 @@ public: return "GImpactMeshShapePart"; } - virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const { return CONST_GIMPACT_TRIMESH_SHAPE_PART; } @@ -825,6 +840,8 @@ public: virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const { + (void) prim_index; + (void) tetrahedron; btAssert(0); } @@ -1036,11 +1053,13 @@ public: virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const { + (void) prim_index; (void) triangle; btAssert(0); } virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const { + (void) prim_index; (void) tetrahedron; btAssert(0); } @@ -1063,12 +1082,14 @@ public: */ virtual void getChildAabb(int child_index,const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const { + (void) child_index; (void) t; (void) aabbMin; (void) aabbMax; btAssert(0); } //! Gets the children virtual btCollisionShape* getChildShape(int index) { + (void) index; btAssert(0); return NULL; } @@ -1077,6 +1098,7 @@ public: //! Gets the child virtual const btCollisionShape* getChildShape(int index) const { + (void) index; btAssert(0); return NULL; } @@ -1084,6 +1106,7 @@ public: //! Gets the children transform virtual btTransform getChildTransform(int index) const { + (void) index; btAssert(0); return btTransform(); } @@ -1094,11 +1117,12 @@ public: */ virtual void setChildTransform(int index, const btTransform & transform) { + (void) index; (void) transform; btAssert(0); } - virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() + virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const { return CONST_GIMPACT_TRIMESH_SHAPE; } @@ -1116,7 +1140,32 @@ public: It gives the triangles in local space */ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + virtual int calculateSerializeBufferSize() const; + + ///fills the dataBuffer and returns the struct name (and 0 on failure) + virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const; + +}; + +///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 +struct btGImpactMeshShapeData +{ + btCollisionShapeData m_collisionShapeData; + + btStridingMeshInterfaceData m_meshInterface; + + btVector3FloatData m_localScaling; + + float m_collisionMargin; + + int m_gimpactSubType; }; +SIMD_FORCE_INLINE int btGImpactMeshShape::calculateSerializeBufferSize() const +{ + return sizeof(btGImpactMeshShapeData); +} + #endif //GIMPACT_MESH_SHAPE_H |