Changeset 7983 for code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
- Timestamp:
- Feb 27, 2011, 7:43:24 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
r5781 r7983 1 1 /* 2 2 Bullet Continuous Collision Detection and Physics Library 3 Copyright (c) 2003-200 6 Erwin Coumans http://continuousphysics.com/Bullet/3 Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 4 5 5 This software is provided 'as-is', without any express or implied warranty. … … 13 13 3. This notice may not be removed or altered from any source distribution. 14 14 */ 15 15 16 #include "btConvexTriangleMeshShape.h" 16 17 #include "BulletCollision/CollisionShapes/btCollisionMargin.h" … … 21 22 22 23 btConvexTriangleMeshShape ::btConvexTriangleMeshShape (btStridingMeshInterface* meshInterface, bool calcAabb) 23 : btPolyhedralConvex Shape(), m_stridingMesh(meshInterface)24 : btPolyhedralConvexAabbCachingShape(), m_stridingMesh(meshInterface) 24 25 { 25 26 m_shapeType = CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE; … … 44 45 LocalSupportVertexCallback(const btVector3& supportVecLocal) 45 46 : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)), 46 m_maxDot(btScalar(- 1e30)),47 m_maxDot(btScalar(-BT_LARGE_FLOAT)), 47 48 m_supportVecLocal(supportVecLocal) 48 49 { … … 92 93 93 94 LocalSupportVertexCallback supportCallback(vec); 94 btVector3 aabbMax(btScalar( 1e30),btScalar(1e30),btScalar(1e30));95 btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT)); 95 96 m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax); 96 97 supVec = supportCallback.GetSupportVertexLocal(); … … 105 106 for (int i=0;i<numVectors;i++) 106 107 { 107 supportVerticesOut[i][3] = btScalar(- 1e30);108 supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT); 108 109 } 109 110 } … … 116 117 const btVector3& vec = vectors[j]; 117 118 LocalSupportVertexCallback supportCallback(vec); 118 btVector3 aabbMax(btScalar( 1e30),btScalar(1e30),btScalar(1e30));119 btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT)); 119 120 m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax); 120 121 supportVerticesOut[j] = supportCallback.GetSupportVertexLocal(); … … 298 299 299 300 CenterCallback centerCallback; 300 btVector3 aabbMax(btScalar( 1e30),btScalar(1e30),btScalar(1e30));301 btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT)); 301 302 m_stridingMesh->InternalProcessAllTriangles(¢erCallback, -aabbMax, aabbMax); 302 303 btVector3 center = centerCallback.getCenter();
Note: See TracChangeset
for help on using the changeset viewer.