Bullet Collision Detection & Physics Library
btGjkEpa2.h
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2008 Erwin Coumans http://continuousphysics.com/Bullet/
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the
7use of this software.
8Permission is granted to anyone to use this software for any purpose,
9including commercial applications, and to alter it and redistribute it
10freely,
11subject to the following restrictions:
12
131. The origin of this software must not be misrepresented; you must not
14claim that you wrote the original software. If you use this software in a
15product, an acknowledgment in the product documentation would be appreciated
16but is not required.
172. Altered source versions must be plainly marked as such, and must not be
18misrepresented as being the original software.
193. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23GJK-EPA collision solver by Nathanael Presson, 2008
24*/
25#ifndef BT_GJK_EPA2_H
26#define BT_GJK_EPA2_H
27
29
32{
34 {
36 {
37 Separated, /* Shapes doesnt penetrate */
38 Penetrating, /* Shapes are penetrating */
39 GJK_Failed, /* GJK phase fail, no big issue, shapes are probably just 'touching' */
40 EPA_Failed /* EPA phase fail, bigger problem, need to save parameters, and debug */
45 };
46
47static int StackSizeRequirement();
48
49static bool Distance( const btConvexShape* shape0,const btTransform& wtrs0,
50 const btConvexShape* shape1,const btTransform& wtrs1,
51 const btVector3& guess,
52 sResults& results);
53
54static bool Penetration(const btConvexShape* shape0,const btTransform& wtrs0,
55 const btConvexShape* shape1,const btTransform& wtrs1,
56 const btVector3& guess,
57 sResults& results,
58 bool usemargins=true);
59#ifndef __SPU__
60static btScalar SignedDistance( const btVector3& position,
61 btScalar margin,
62 const btConvexShape* shape,
63 const btTransform& wtrs,
64 sResults& results);
65
66static bool SignedDistance( const btConvexShape* shape0,const btTransform& wtrs0,
67 const btConvexShape* shape1,const btTransform& wtrs1,
68 const btVector3& guess,
69 sResults& results);
70#endif //__SPU__
71
72};
73
74#endif //BT_GJK_EPA2_H
75
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:292
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
Definition: btConvexShape.h:32
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:34
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:84
enum btGjkEpaSolver2::sResults::eStatus status
btVector3 witnesses[2]
Definition: btGjkEpa2.h:42
btGjkEpaSolver contributed under zlib by Nathanael Presson
Definition: btGjkEpa2.h:32
static btScalar SignedDistance(const btVector3 &position, btScalar margin, const btConvexShape *shape, const btTransform &wtrs, sResults &results)
Definition: btGjkEpa2.cpp:966
static bool Penetration(const btConvexShape *shape0, const btTransform &wtrs0, const btConvexShape *shape1, const btTransform &wtrs1, const btVector3 &guess, sResults &results, bool usemargins=true)
Definition: btGjkEpa2.cpp:920
static bool Distance(const btConvexShape *shape0, const btTransform &wtrs0, const btConvexShape *shape1, const btTransform &wtrs1, const btVector3 &guess, sResults &results)
Definition: btGjkEpa2.cpp:882
static int StackSizeRequirement()
Definition: btGjkEpa2.cpp:876