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/btConeShape.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/btConeShape.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp index 46232b3187c..207b3024bc3 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp @@ -24,7 +24,7 @@ m_height(height) { setConeUpIndex(1); btVector3 halfExtents; - m_sinAngle = (m_radius / sqrt(m_radius * m_radius + m_height * m_height)); + m_sinAngle = (m_radius / btSqrt(m_radius * m_radius + m_height * m_height)); } btConeShapeZ::btConeShapeZ (btScalar radius,btScalar height): @@ -67,15 +67,15 @@ void btConeShape::setConeUpIndex(int upIndex) btVector3 btConeShape::coneLocalSupport(const btVector3& v) const { - float halfHeight = m_height * 0.5f; + btScalar halfHeight = m_height * btScalar(0.5); if (v[m_coneIndices[1]] > v.length() * m_sinAngle) { btVector3 tmp; - tmp[m_coneIndices[0]] = 0.f; + tmp[m_coneIndices[0]] = btScalar(0.); tmp[m_coneIndices[1]] = halfHeight; - tmp[m_coneIndices[2]] = 0.f; + tmp[m_coneIndices[2]] = btScalar(0.); return tmp; } else { @@ -90,9 +90,9 @@ btVector3 btConeShape::coneLocalSupport(const btVector3& v) const } else { btVector3 tmp; - tmp[m_coneIndices[0]] = 0.f; + tmp[m_coneIndices[0]] = btScalar(0.); tmp[m_coneIndices[1]] = -halfHeight; - tmp[m_coneIndices[2]] = 0.f; + tmp[m_coneIndices[2]] = btScalar(0.); return tmp; } } @@ -117,12 +117,12 @@ void btConeShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVect btVector3 btConeShape::localGetSupportingVertex(const btVector3& vec) const { btVector3 supVertex = coneLocalSupport(vec); - if ( getMargin()!=0.f ) + if ( getMargin()!=btScalar(0.) ) { btVector3 vecnorm = vec; if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) { - vecnorm.setValue(-1.f,-1.f,-1.f); + vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); } vecnorm.normalize(); supVertex+= getMargin() * vecnorm; |