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:
authorErwin Coumans <blender@erwincoumans.com>2007-06-23 09:28:07 +0400
committerErwin Coumans <blender@erwincoumans.com>2007-06-23 09:28:07 +0400
commitca26aeb7b23e37e65f49d907ea53fcaeee77ad4e (patch)
treeb6530195a8ef5d874b9fc2bbb9574f1484781be5 /extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
parent14ad8c9941ac1e6f5252a843c6ad17653cbbd689 (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/btConvexShape.cpp')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
index 9537235ff8a..7edf1ea6db8 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
@@ -15,8 +15,9 @@ subject to the following restrictions:
#include "btConvexShape.h"
+
btConvexShape::btConvexShape()
-: m_localScaling(1.f,1.f,1.f),
+: m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)),
m_collisionMargin(CONVEX_DISTANCE_MARGIN)
{
}
@@ -35,35 +36,42 @@ void btConvexShape::getAabbSlow(const btTransform& trans,btVector3&minAabb,btVec
btScalar margin = getMargin();
for (int i=0;i<3;i++)
{
- btVector3 vec(0.f,0.f,0.f);
- vec[i] = 1.f;
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
btVector3 sv = localGetSupportingVertex(vec*trans.getBasis());
btVector3 tmp = trans(sv);
maxAabb[i] = tmp[i]+margin;
- vec[i] = -1.f;
+ vec[i] = btScalar(-1.);
tmp = trans(localGetSupportingVertex(vec*trans.getBasis()));
minAabb[i] = tmp[i]-margin;
}
};
+
btVector3 btConvexShape::localGetSupportingVertex(const btVector3& vec)const
- {
+{
+#ifndef __SPU__
+
btVector3 supVertex = localGetSupportingVertexWithoutMargin(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;
}
return supVertex;
+#else
+ return btVector3(0,0,0);
+#endif //__SPU__
+
}