Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp
index 39e458c0f22..ca65dd03f3e 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp
@@ -26,14 +26,17 @@ btSphereShape ::btSphereShape (btScalar radius)
btVector3 btSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
{
- return btVector3(0.f,0.f,0.f);
+ (void)vec;
+ return btVector3(btScalar(0.),btScalar(0.),btScalar(0.));
}
void btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
{
+ (void)vectors;
+
for (int i=0;i<numVectors;i++)
{
- supportVerticesOut[i].setValue(0.f,0.f,0.f);
+ supportVerticesOut[i].setValue(btScalar(0.),btScalar(0.),btScalar(0.));
}
}
@@ -46,7 +49,7 @@ btVector3 btSphereShape::localGetSupportingVertex(const btVector3& vec)const
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;
@@ -67,8 +70,8 @@ void btSphereShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& a
void btSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia)
{
- btScalar elem = 0.4f * mass * getMargin()*getMargin();
- inertia[0] = inertia[1] = inertia[2] = elem;
+ btScalar elem = btScalar(0.4) * mass * getMargin()*getMargin();
+ inertia.setValue(elem,elem,elem);
}