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>2011-03-12 23:34:17 +0300
committerErwin Coumans <blender@erwincoumans.com>2011-03-12 23:34:17 +0300
commit5e374328a87c1b418f8454d5ef38470484804961 (patch)
tree1d6de85165175c5192f74dbd423e1d5cb48f8ff6 /extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
parent8c526e79e31d40d56a6fecce9343c74bd9fe62d8 (diff)
update Bullet physics sdk to latest trunk/version 2.78
add PhysicsConstraints.exportBulletFile(char* fileName) python command I'll be checking the bf-committers mailing list, in case this commit broke stuff scons needs to be updated, I'll do that in a second.
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
index 4bd986bb7f7..0f9ced554b8 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -12,6 +12,7 @@ subject to the following restrictions:
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
+
#include "btConvexTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
@@ -20,7 +21,7 @@ subject to the following restrictions:
btConvexTriangleMeshShape ::btConvexTriangleMeshShape (btStridingMeshInterface* meshInterface, bool calcAabb)
-: btPolyhedralConvexShape(), m_stridingMesh(meshInterface)
+: btPolyhedralConvexAabbCachingShape(), m_stridingMesh(meshInterface)
{
m_shapeType = CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE;
if ( calcAabb )
@@ -43,7 +44,7 @@ public:
LocalSupportVertexCallback(const btVector3& supportVecLocal)
: m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)),
- m_maxDot(btScalar(-1e30)),
+ m_maxDot(btScalar(-BT_LARGE_FLOAT)),
m_supportVecLocal(supportVecLocal)
{
}
@@ -91,7 +92,7 @@ btVector3 btConvexTriangleMeshShape::localGetSupportingVertexWithoutMargin(const
}
LocalSupportVertexCallback supportCallback(vec);
- btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax);
supVec = supportCallback.GetSupportVertexLocal();
@@ -104,7 +105,7 @@ void btConvexTriangleMeshShape::batchedUnitVectorGetSupportingVertexWithoutMargi
{
for (int i=0;i<numVectors;i++)
{
- supportVerticesOut[i][3] = btScalar(-1e30);
+ supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
}
}
@@ -115,7 +116,7 @@ void btConvexTriangleMeshShape::batchedUnitVectorGetSupportingVertexWithoutMargi
{
const btVector3& vec = vectors[j];
LocalSupportVertexCallback supportCallback(vec);
- btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax);
supportVerticesOut[j] = supportCallback.GetSupportVertexLocal();
}
@@ -297,7 +298,7 @@ void btConvexTriangleMeshShape::calculatePrincipalAxisTransform(btTransform& pri
};
CenterCallback centerCallback;
- btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
m_stridingMesh->InternalProcessAllTriangles(&centerCallback, -aabbMax, aabbMax);
btVector3 center = centerCallback.getCenter();
principal.setOrigin(center);