Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 12:36:08 AM (16 years ago)
Author:
dafrick
Message:

Merging of the current QuestSystem branch.

Location:
code/branches/questsystem5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem5

  • code/branches/questsystem5/src/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h

    r2662 r2907  
    55This software is provided 'as-is', without any express or implied warranty.
    66In no event will the authors be held liable for any damages arising from the use of this software.
    7 Permission is granted to anyone to use this software for any purpose, 
    8 including commercial applications, and to alter it and redistribute it freely, 
     7Permission is granted to anyone to use this software for any purpose,
     8including commercial applications, and to alter it and redistribute it freely,
    99subject to the following restrictions:
    1010
     
    2929class btConvexPlaneCollisionAlgorithm : public btCollisionAlgorithm
    3030{
    31         bool    m_ownManifold;
     31        bool            m_ownManifold;
    3232        btPersistentManifold*   m_manifoldPtr;
    33         bool    m_isSwapped;
    34        
     33        bool            m_isSwapped;
     34        int                     m_numPerturbationIterations;
     35        int                     m_minimumPointsPerturbationThreshold;
     36
    3537public:
    3638
    37         btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped);
     39        btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped, int numPerturbationIterations,int minimumPointsPerturbationThreshold);
    3840
    3941        virtual ~btConvexPlaneCollisionAlgorithm();
    4042
    4143        virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
     44
     45        void collideSingleContact (const btQuaternion& perturbeRot, btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
    4246
    4347        virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
     
    5357        struct CreateFunc :public       btCollisionAlgorithmCreateFunc
    5458        {
     59                int     m_numPerturbationIterations;
     60                int m_minimumPointsPerturbationThreshold;
     61                       
     62                CreateFunc()
     63                        : m_numPerturbationIterations(3),
     64                        m_minimumPointsPerturbationThreshold(3)
     65                {
     66                }
     67               
    5568                virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
    5669                {
     
    5871                        if (!m_swapped)
    5972                        {
    60                                 return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false);
     73                                return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold);
    6174                        } else
    6275                        {
    63                                 return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true);
     76                                return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold);
    6477                        }
    6578                }
Note: See TracChangeset for help on using the changeset viewer.