diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-10-25 07:43:20 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-10-25 07:43:20 +0400 |
commit | 472a021aca3c0a6278151f7abee4e0970b026e3f (patch) | |
tree | 3456ce084e33450cc21c68beca1bd407801bf256 /extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h | |
parent | 4514eeaa8e335a86de0bda68aa4814c0bafad7eb (diff) |
bullet: Update to version 2.82 (bullet revision 2705)
Remove patch that has been applied upstream.
Fixes several bugs.
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h index 5966ae48f11..4a0df0d558b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h @@ -90,6 +90,13 @@ public: } virtual void setLocalScaling(const btVector3& scaling); + + + 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; + }; @@ -104,19 +111,61 @@ class btConeShapeX : public btConeShape return btVector3 (1,0,0); } + //debugging + virtual const char* getName()const + { + return "ConeX"; + } + + }; ///btConeShapeZ implements a Cone shape, around the Z axis class btConeShapeZ : public btConeShape { - public: - btConeShapeZ(btScalar radius,btScalar height); +public: + btConeShapeZ(btScalar radius,btScalar height); virtual btVector3 getAnisotropicRollingFrictionDirection() const { return btVector3 (0,0,1); } + //debugging + virtual const char* getName()const + { + return "ConeZ"; + } + + }; + +///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 +struct btConeShapeData +{ + btConvexInternalShapeData m_convexInternalShapeData; + + int m_upIndex; + + char m_padding[4]; +}; + +SIMD_FORCE_INLINE int btConeShape::calculateSerializeBufferSize() const +{ + return sizeof(btConeShapeData); +} + +///fills the dataBuffer and returns the struct name (and 0 on failure) +SIMD_FORCE_INLINE const char* btConeShape::serialize(void* dataBuffer, btSerializer* serializer) const +{ + btConeShapeData* shapeData = (btConeShapeData*) dataBuffer; + + btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer); + + shapeData->m_upIndex = m_coneIndices[1]; + + return "btConeShapeData"; +} + #endif //BT_CONE_MINKOWSKI_H |