1 | |
---|
2 | /* |
---|
3 | Bullet Continuous Collision Detection and Physics Library |
---|
4 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ |
---|
5 | |
---|
6 | This software is provided 'as-is', without any express or implied warranty. |
---|
7 | In no event will the authors be held liable for any damages arising from the use of this software. |
---|
8 | Permission is granted to anyone to use this software for any purpose, |
---|
9 | including commercial applications, and to alter it and redistribute it freely, |
---|
10 | subject to the following restrictions: |
---|
11 | |
---|
12 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. |
---|
13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. |
---|
14 | 3. This notice may not be removed or altered from any source distribution. |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef SPU_EPA_PENETRATION_DEPTH_SOLVER_H |
---|
18 | #define SPU_EPA_PENETRATION_DEPTH_SOLVER_H |
---|
19 | |
---|
20 | |
---|
21 | #include "SpuConvexPenetrationDepthSolver.h" |
---|
22 | |
---|
23 | class btStackAlloc; |
---|
24 | class btIDebugDraw; |
---|
25 | class SpuVoronoiSimplexSolver; |
---|
26 | |
---|
27 | ///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. |
---|
28 | ///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. |
---|
29 | class SpuEpaPenetrationDepthSolver : public SpuConvexPenetrationDepthSolver |
---|
30 | { |
---|
31 | public: |
---|
32 | |
---|
33 | virtual bool calcPenDepth( SpuVoronoiSimplexSolver& simplexSolver, |
---|
34 | void* convexA,void* convexB,int shapeTypeA, int shapeTypeB, float marginA, float marginB, |
---|
35 | btTransform& transA,const btTransform& transB, |
---|
36 | btVector3& v, btPoint3& pa, btPoint3& pb, |
---|
37 | class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc, |
---|
38 | struct SpuConvexPolyhedronVertexData* convexVertexDataA, |
---|
39 | struct SpuConvexPolyhedronVertexData* convexVertexDataB |
---|
40 | ) const; |
---|
41 | |
---|
42 | |
---|
43 | }; |
---|
44 | |
---|
45 | |
---|
46 | #endif //SPU_EPA_PENETRATION_DEPTH_SOLVER_H |
---|
47 | |
---|