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/btCylinderShape.cpp | |
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/btCylinderShape.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp index 16b263474f0..1666afb3b88 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp @@ -16,23 +16,33 @@ subject to the following restrictions: #include "LinearMath/btPoint3.h" btCylinderShape::btCylinderShape (const btVector3& halfExtents) -:btBoxShape(halfExtents) +:btBoxShape(halfExtents), +m_upAxis(1) { - + recalcLocalAabb(); } btCylinderShapeX::btCylinderShapeX (const btVector3& halfExtents) :btCylinderShape(halfExtents) { + m_upAxis = 0; + recalcLocalAabb(); } btCylinderShapeZ::btCylinderShapeZ (const btVector3& halfExtents) :btCylinderShape(halfExtents) { + m_upAxis = 2; + recalcLocalAabb(); } +void btCylinderShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const +{ + //skip the box 'getAabb' + btPolyhedralConvexShape::getAabb(t,aabbMin,aabbMax); +} inline btVector3 CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v) @@ -46,8 +56,8 @@ const int ZZ = 2; // extents of the cylinder is: X,Y is for radius, and Z for height - float radius = halfExtents[XX]; - float halfHeight = halfExtents[cylinderUpAxis]; + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; btVector3 tmp; @@ -87,8 +97,8 @@ const int YY = 1; const int ZZ = 2; - float radius = halfExtents[XX]; - float halfHeight = halfExtents[cylinderUpAxis]; + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; btVector3 tmp; @@ -124,8 +134,8 @@ const int ZZ = 1; // extents of the cylinder is: X,Y is for radius, and Z for height - float radius = halfExtents[XX]; - float halfHeight = halfExtents[cylinderUpAxis]; + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; btVector3 tmp; |