btGjkEpa2.h
Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2003-2008 Erwin Coumans  http://continuousphysics.com/Bullet/
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the
00007 use of this software.
00008 Permission is granted to anyone to use this software for any purpose,
00009 including commercial applications, and to alter it and redistribute it
00010 freely,
00011 subject to the following restrictions:
00012 
00013 1. The origin of this software must not be misrepresented; you must not
00014 claim that you wrote the original software. If you use this software in a
00015 product, an acknowledgment in the product documentation would be appreciated
00016 but is not required.
00017 2. Altered source versions must be plainly marked as such, and must not be
00018 misrepresented as being the original software.
00019 3. This notice may not be removed or altered from any source distribution.
00020 */
00021 
00022 /*
00023 GJK-EPA collision solver by Nathanael Presson, 2008
00024 */
00025 #ifndef BT_GJK_EPA2_H
00026 #define BT_GJK_EPA2_H
00027 
00028 #include "BulletCollision/CollisionShapes/btConvexShape.h"
00029 
00031 struct  btGjkEpaSolver2
00032 {
00033 struct  sResults
00034         {
00035         enum eStatus
00036                 {
00037                 Separated,              /* Shapes doesnt penetrate                                                                                              */ 
00038                 Penetrating,    /* Shapes are penetrating                                                                                               */ 
00039                 GJK_Failed,             /* GJK phase fail, no big issue, shapes are probably just 'touching'    */ 
00040                 EPA_Failed              /* EPA phase fail, bigger problem, need to save parameters, and debug   */ 
00041                 }               status;
00042         btVector3       witnesses[2];
00043         btVector3       normal;
00044         btScalar        distance;
00045         };
00046 
00047 static int              StackSizeRequirement();
00048 
00049 static bool             Distance(       const btConvexShape* shape0,const btTransform& wtrs0,
00050                                                         const btConvexShape* shape1,const btTransform& wtrs1,
00051                                                         const btVector3& guess,
00052                                                         sResults& results);
00053 
00054 static bool             Penetration(const btConvexShape* shape0,const btTransform& wtrs0,
00055                                                         const btConvexShape* shape1,const btTransform& wtrs1,
00056                                                         const btVector3& guess,
00057                                                         sResults& results,
00058                                                         bool usemargins=true);
00059 #ifndef __SPU__
00060 static btScalar SignedDistance( const btVector3& position,
00061                                                                 btScalar margin,
00062                                                                 const btConvexShape* shape,
00063                                                                 const btTransform& wtrs,
00064                                                                 sResults& results);
00065                                                         
00066 static bool             SignedDistance( const btConvexShape* shape0,const btTransform& wtrs0,
00067                                                                 const btConvexShape* shape1,const btTransform& wtrs1,
00068                                                                 const btVector3& guess,
00069                                                                 sResults& results);
00070 #endif //__SPU__
00071 
00072 };
00073 
00074 #endif //BT_GJK_EPA2_H
00075 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:31