Changeset 2882 for code/trunk/src/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
- Timestamp:
- Mar 31, 2009, 8:05:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
r2662 r2882 34 34 ///#define USE_SEPDISTANCE_UTIL2 1 35 35 36 ///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations. 36 ///The convexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations between two convex objects. 37 ///Multiple contact points are calculated by perturbing the orientation of the smallest object orthogonal to the separating normal. 38 ///This idea was described by Gino van den Bergen in this forum topic http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=4&t=288&p=888#p888 37 39 class btConvexConvexAlgorithm : public btActivatingCollisionAlgorithm 38 40 { … … 48 50 bool m_lowLevelOfDetail; 49 51 52 int m_numPerturbationIterations; 53 int m_minimumPointsPerturbationThreshold; 54 55 50 56 ///cache separating vector to speedup collision detection 51 57 … … 53 59 public: 54 60 55 btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); 61 btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold); 62 56 63 57 64 virtual ~btConvexConvexAlgorithm(); … … 79 86 struct CreateFunc :public btCollisionAlgorithmCreateFunc 80 87 { 88 81 89 btConvexPenetrationDepthSolver* m_pdSolver; 82 90 btSimplexSolverInterface* m_simplexSolver; 83 91 int m_numPerturbationIterations; 92 int m_minimumPointsPerturbationThreshold; 93 84 94 CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); 85 95 … … 89 99 { 90 100 void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConvexAlgorithm)); 91 return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver );101 return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold); 92 102 } 93 103 };
Note: See TracChangeset
for help on using the changeset viewer.