Bullet Collision Detection & Physics Library
btGjkPairDetector.h
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
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 use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. 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.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
14*/
15
16#ifndef BT_GJK_PAIR_DETECTOR_H
17#define BT_GJK_PAIR_DETECTOR_H
18
21
22class btConvexShape;
25
28{
38
41
42public:
43 //some debugging to fix degeneracy problems
49
52 virtual ~btGjkPairDetector(){};
53
54 virtual void getClosestPoints(const ClosestPointInput& input, Result& output, class btIDebugDraw* debugDraw, bool swapResults = false);
55
56 void getClosestPointsNonVirtual(const ClosestPointInput& input, Result& output, class btIDebugDraw* debugDraw);
57
59 {
61 }
62
64 {
66 }
68 {
70 }
71
73 {
75 }
77 {
79 }
80
82 {
84 }
85
88 {
90 }
91};
92
93#endif //BT_GJK_PAIR_DETECTOR_H
const T & btMax(const T &a, const T &b)
Definition btMinMax.h:27
#define output
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition btScalar.h:314
#define btSimplexSolverInterface
ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
const btConvexShape * m_minkowskiB
const btVector3 & getCachedSeparatingAxis() const
const btConvexShape * m_minkowskiA
void setPenetrationDepthSolver(btConvexPenetrationDepthSolver *penetrationDepthSolver)
virtual void getClosestPoints(const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)
btScalar getCachedSeparatingDistance() const
void setCachedSeparatingAxis(const btVector3 &separatingAxis)
btScalar m_cachedSeparatingDistance
void setIgnoreMargin(bool ignoreMargin)
don't use setIgnoreMargin, it's for Bullet's internal use
void setMinkowskiA(const btConvexShape *minkA)
btSimplexSolverInterface * m_simplexSolver
btVector3 m_cachedSeparatingAxis
void getClosestPointsNonVirtual(const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw)
btConvexPenetrationDepthSolver * m_penetrationDepthSolver
void setMinkowskiB(const btConvexShape *minkB)
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
btVector3 can be used to represent 3D points and vectors.
Definition btVector3.h:82
This interface is made to be used by an iterative approach to do TimeOfImpact calculations This inter...