Changeset 2907 for code/branches/questsystem5/src/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
- Timestamp:
- Apr 8, 2009, 12:36:08 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
r2662 r2907 5 5 This software is provided 'as-is', without any express or implied warranty. 6 6 In 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, 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, 9 9 subject to the following restrictions: 10 10 … … 29 29 class btConvexPlaneCollisionAlgorithm : public btCollisionAlgorithm 30 30 { 31 bool m_ownManifold;31 bool m_ownManifold; 32 32 btPersistentManifold* m_manifoldPtr; 33 bool m_isSwapped; 34 33 bool m_isSwapped; 34 int m_numPerturbationIterations; 35 int m_minimumPointsPerturbationThreshold; 36 35 37 public: 36 38 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); 38 40 39 41 virtual ~btConvexPlaneCollisionAlgorithm(); 40 42 41 43 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); 42 46 43 47 virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); … … 53 57 struct CreateFunc :public btCollisionAlgorithmCreateFunc 54 58 { 59 int m_numPerturbationIterations; 60 int m_minimumPointsPerturbationThreshold; 61 62 CreateFunc() 63 : m_numPerturbationIterations(3), 64 m_minimumPointsPerturbationThreshold(3) 65 { 66 } 67 55 68 virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) 56 69 { … … 58 71 if (!m_swapped) 59 72 { 60 return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false );73 return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold); 61 74 } else 62 75 { 63 return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true );76 return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold); 64 77 } 65 78 }
Note: See TracChangeset
for help on using the changeset viewer.