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/btStaticPlaneShape.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/btStaticPlaneShape.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp index 8c7022ba83b..4fbaafa1b93 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp @@ -21,7 +21,7 @@ subject to the following restrictions: btStaticPlaneShape::btStaticPlaneShape(const btVector3& planeNormal,btScalar planeConstant) :m_planeNormal(planeNormal), m_planeConstant(planeConstant), -m_localScaling(0.f,0.f,0.f) +m_localScaling(btScalar(0.),btScalar(0.),btScalar(0.)) { } @@ -34,16 +34,19 @@ btStaticPlaneShape::~btStaticPlaneShape() void btStaticPlaneShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const { - btVector3 infvec (1e30f,1e30f,1e30f); + (void)t; + /* + btVector3 infvec (btScalar(1e30),btScalar(1e30),btScalar(1e30)); btVector3 center = m_planeNormal*m_planeConstant; aabbMin = center + infvec*m_planeNormal; aabbMax = aabbMin; aabbMin.setMin(center - infvec*m_planeNormal); aabbMax.setMax(center - infvec*m_planeNormal); + */ - aabbMin.setValue(-1e30f,-1e30f,-1e30f); - aabbMax.setValue(1e30f,1e30f,1e30f); + aabbMin.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + aabbMax.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); } @@ -53,9 +56,9 @@ void btStaticPlaneShape::getAabb(const btTransform& t,btVector3& aabbMin,btVecto void btStaticPlaneShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const { - btVector3 halfExtents = (aabbMax - aabbMin) * 0.5f; + btVector3 halfExtents = (aabbMax - aabbMin) * btScalar(0.5); btScalar radius = halfExtents.length(); - btVector3 center = (aabbMax + aabbMin) * 0.5f; + btVector3 center = (aabbMax + aabbMin) * btScalar(0.5); //this is where the triangles are generated, given AABB and plane equation (normal/constant) @@ -85,9 +88,11 @@ void btStaticPlaneShape::processAllTriangles(btTriangleCallback* callback,const void btStaticPlaneShape::calculateLocalInertia(btScalar mass,btVector3& inertia) { + (void)mass; + //moving concave objects not supported - inertia.setValue(0.f,0.f,0.f); + inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); } void btStaticPlaneShape::setLocalScaling(const btVector3& scaling) |