Imported Upstream version 2.81
[platform/upstream/libbullet.git] / src / BulletMultiThreaded / SpuNarrowPhaseCollisionTask / SpuMinkowskiPenetrationDepthSolver.h
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 MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
18 #define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
19
20
21 #include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
22
23 class btStackAlloc;
24 class btIDebugDraw;
25 class btVoronoiSimplexSolver;
26 class btConvexShape;
27
28 ///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation.
29 ///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points.
30 class SpuMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver
31 {
32 public:
33         SpuMinkowskiPenetrationDepthSolver() {}
34         virtual ~SpuMinkowskiPenetrationDepthSolver() {};
35
36                 virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
37                 const btConvexShape* convexA,const btConvexShape* convexB,
38                                         const btTransform& transA,const btTransform& transB,
39                                 btVector3& v, btVector3& pa, btVector3& pb,
40                                 class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
41                                 );
42
43
44 };
45
46
47 #endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
48