Bullet Collision Detection & Physics Library
Public Member Functions | Public Attributes | Private Attributes | List of all members
btGjkPairDetector Class Reference

btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface More...

#include <btGjkPairDetector.h>

Inheritance diagram for btGjkPairDetector:
Inheritance graph
[legend]
Collaboration diagram for btGjkPairDetector:
Collaboration graph
[legend]

Public Member Functions

 btGjkPairDetector (const btConvexShape *objectA, const btConvexShape *objectB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver)
 
 btGjkPairDetector (const btConvexShape *objectA, const btConvexShape *objectB, int shapeTypeA, int shapeTypeB, btScalar marginA, btScalar marginB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver)
 
virtual ~btGjkPairDetector ()
 
virtual void getClosestPoints (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)
 
void getClosestPointsNonVirtual (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw)
 
void setMinkowskiA (const btConvexShape *minkA)
 
void setMinkowskiB (const btConvexShape *minkB)
 
void setCachedSeperatingAxis (const btVector3 &seperatingAxis)
 
const btVector3getCachedSeparatingAxis () const
 
btScalar getCachedSeparatingDistance () const
 
void setPenetrationDepthSolver (btConvexPenetrationDepthSolver *penetrationDepthSolver)
 
void setIgnoreMargin (bool ignoreMargin)
 don't use setIgnoreMargin, it's for Bullet's internal use More...
 
- Public Member Functions inherited from btDiscreteCollisionDetectorInterface
virtual ~btDiscreteCollisionDetectorInterface ()
 

Public Attributes

int m_lastUsedMethod
 
int m_curIter
 
int m_degenerateSimplex
 
int m_catchDegeneracies
 

Private Attributes

btVector3 m_cachedSeparatingAxis
 
btConvexPenetrationDepthSolverm_penetrationDepthSolver
 
btSimplexSolverInterfacem_simplexSolver
 
const btConvexShapem_minkowskiA
 
const btConvexShapem_minkowskiB
 
int m_shapeTypeA
 
int m_shapeTypeB
 
btScalar m_marginA
 
btScalar m_marginB
 
bool m_ignoreMargin
 
btScalar m_cachedSeparatingDistance
 

Detailed Description

btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface

Definition at line 30 of file btGjkPairDetector.h.

Constructor & Destructor Documentation

btGjkPairDetector::btGjkPairDetector ( const btConvexShape objectA,
const btConvexShape objectB,
btSimplexSolverInterface simplexSolver,
btConvexPenetrationDepthSolver penetrationDepthSolver 
)

Definition at line 41 of file btGjkPairDetector.cpp.

btGjkPairDetector::btGjkPairDetector ( const btConvexShape objectA,
const btConvexShape objectB,
int  shapeTypeA,
int  shapeTypeB,
btScalar  marginA,
btScalar  marginB,
btSimplexSolverInterface simplexSolver,
btConvexPenetrationDepthSolver penetrationDepthSolver 
)

Definition at line 56 of file btGjkPairDetector.cpp.

virtual btGjkPairDetector::~btGjkPairDetector ( )
inlinevirtual

Definition at line 59 of file btGjkPairDetector.h.

Member Function Documentation

const btVector3& btGjkPairDetector::getCachedSeparatingAxis ( ) const
inline

Definition at line 80 of file btGjkPairDetector.h.

btScalar btGjkPairDetector::getCachedSeparatingDistance ( ) const
inline

Definition at line 84 of file btGjkPairDetector.h.

void btGjkPairDetector::getClosestPoints ( const ClosestPointInput input,
Result output,
class btIDebugDraw debugDraw,
bool  swapResults = false 
)
virtual

Implements btDiscreteCollisionDetectorInterface.

Definition at line 72 of file btGjkPairDetector.cpp.

void btGjkPairDetector::getClosestPointsNonVirtual ( const ClosestPointInput input,
Result output,
class btIDebugDraw debugDraw 
)

this is another degenerate case, where the initial GJK calculation reports a degenerate case EPA reports no penetration, and the second GJK (using the supporting vector without margin) reports a valid positive distance. Use the results of the second GJK instead of failing. thanks to Jacob.Langford for the reproduction case http://code.google.com/p/bullet/issues/detail?id=250

Definition at line 82 of file btGjkPairDetector.cpp.

void btGjkPairDetector::setCachedSeperatingAxis ( const btVector3 seperatingAxis)
inline

Definition at line 75 of file btGjkPairDetector.h.

void btGjkPairDetector::setIgnoreMargin ( bool  ignoreMargin)
inline

don't use setIgnoreMargin, it's for Bullet's internal use

Definition at line 95 of file btGjkPairDetector.h.

void btGjkPairDetector::setMinkowskiA ( const btConvexShape minkA)
inline

Definition at line 66 of file btGjkPairDetector.h.

void btGjkPairDetector::setMinkowskiB ( const btConvexShape minkB)
inline

Definition at line 71 of file btGjkPairDetector.h.

void btGjkPairDetector::setPenetrationDepthSolver ( btConvexPenetrationDepthSolver penetrationDepthSolver)
inline

Definition at line 89 of file btGjkPairDetector.h.

Member Data Documentation

btVector3 btGjkPairDetector::m_cachedSeparatingAxis
private

Definition at line 34 of file btGjkPairDetector.h.

btScalar btGjkPairDetector::m_cachedSeparatingDistance
private

Definition at line 45 of file btGjkPairDetector.h.

int btGjkPairDetector::m_catchDegeneracies

Definition at line 54 of file btGjkPairDetector.h.

int btGjkPairDetector::m_curIter

Definition at line 52 of file btGjkPairDetector.h.

int btGjkPairDetector::m_degenerateSimplex

Definition at line 53 of file btGjkPairDetector.h.

bool btGjkPairDetector::m_ignoreMargin
private

Definition at line 44 of file btGjkPairDetector.h.

int btGjkPairDetector::m_lastUsedMethod

Definition at line 51 of file btGjkPairDetector.h.

btScalar btGjkPairDetector::m_marginA
private

Definition at line 41 of file btGjkPairDetector.h.

btScalar btGjkPairDetector::m_marginB
private

Definition at line 42 of file btGjkPairDetector.h.

const btConvexShape* btGjkPairDetector::m_minkowskiA
private

Definition at line 37 of file btGjkPairDetector.h.

const btConvexShape* btGjkPairDetector::m_minkowskiB
private

Definition at line 38 of file btGjkPairDetector.h.

btConvexPenetrationDepthSolver* btGjkPairDetector::m_penetrationDepthSolver
private

Definition at line 35 of file btGjkPairDetector.h.

int btGjkPairDetector::m_shapeTypeA
private

Definition at line 39 of file btGjkPairDetector.h.

int btGjkPairDetector::m_shapeTypeB
private

Definition at line 40 of file btGjkPairDetector.h.

btSimplexSolverInterface* btGjkPairDetector::m_simplexSolver
private

Definition at line 36 of file btGjkPairDetector.h.


The documentation for this class was generated from the following files: