Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2009, 8:05:51 PM (15 years ago)
Author:
rgrieder
Message:

Update from Bullet 2.73 to 2.74.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h

    r2662 r2882  
    3434///#define USE_SEPDISTANCE_UTIL2 1
    3535
    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
    3739class btConvexConvexAlgorithm : public btActivatingCollisionAlgorithm
    3840{
     
    4850        bool                    m_lowLevelOfDetail;
    4951       
     52        int m_numPerturbationIterations;
     53        int m_minimumPointsPerturbationThreshold;
     54
     55
    5056        ///cache separating vector to speedup collision detection
    5157       
     
    5359public:
    5460
    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
    5663
    5764        virtual ~btConvexConvexAlgorithm();
     
    7986        struct CreateFunc :public       btCollisionAlgorithmCreateFunc
    8087        {
     88
    8189                btConvexPenetrationDepthSolver*         m_pdSolver;
    8290                btSimplexSolverInterface*                       m_simplexSolver;
    83                
     91                int m_numPerturbationIterations;
     92                int m_minimumPointsPerturbationThreshold;
     93
    8494                CreateFunc(btSimplexSolverInterface*                    simplexSolver, btConvexPenetrationDepthSolver* pdSolver);
    8595               
     
    8999                {
    90100                        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);
    92102                }
    93103        };
Note: See TracChangeset for help on using the changeset viewer.