Back to index

supertuxkart  0.5+dfsg1
btGjkEpa2.h
Go to the documentation of this file.
00001 #ifndef _68DA1F85_90B7_4bb0_A705_83B4040A75C6_
00002 #define _68DA1F85_90B7_4bb0_A705_83B4040A75C6_
00003 #include "BulletCollision/CollisionShapes/btConvexShape.h"
00004 
00006 struct btGjkEpaSolver2
00007 {
00008 struct sResults
00009        {
00010        enum eStatus
00011               {
00012               Separated,           /* Shapes doesnt penetrate                                                                               */ 
00013               Penetrating,  /* Shapes are penetrating                                                                                */ 
00014               GJK_Failed,          /* GJK phase fail, no big issue, shapes are probably just 'touching'  */ 
00015               EPA_Failed,          /* EPA phase fail, bigger problem, need to save parameters, and debug */ 
00016               }             status;
00017        btVector3     witnesses[2];
00018        btVector3     normal;
00019        };
00020 
00021 static int           StackSizeRequirement();
00022 
00023 static btScalar      Distance(     const btConvexShape* shape0,const btTransform& wtrs0,
00024                                                  const btConvexShape* shape1,const btTransform& wtrs1,
00025                                                  sResults&     results);
00026                                                  
00027 static btScalar      SignedDistance(      const btVector3& position,
00028                                                         btScalar margin,
00029                                                         const btConvexShape* shape,
00030                                                         const btTransform& wtrs,
00031                                                         sResults& results);
00032 
00033 static bool          Penetration(const btConvexShape* shape0,const btTransform& wtrs0,
00034                                                  const btConvexShape* shape1,const btTransform& wtrs1,
00035                                                  const btVector3& guess,
00036                                                  sResults&     results);
00037 };
00038 
00039 #endif