Bullet Collision Detection & Physics Library
btDispatcher.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
4 
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10 
11 1. 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.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15 
16 #ifndef BT_DISPATCHER_H
17 #define BT_DISPATCHER_H
18 #include "LinearMath/btScalar.h"
19 
21 struct btBroadphaseProxy;
22 class btRigidBody;
23 class btCollisionObject;
26 
28 class btPoolAllocator;
29 
31 {
33  {
36  };
38  :m_timeStep(btScalar(0.)),
39  m_stepCount(0),
42  m_useContinuous(true),
43  m_debugDraw(0),
44  m_enableSatConvex(false),
45  m_enableSPU(true),
46  m_useEpa(true),
51  {
52 
53  }
62  bool m_useEpa;
67 };
68 
70 {
73 };
74 
78 {
79 
80 
81 public:
82  virtual ~btDispatcher() ;
83 
84  virtual btCollisionAlgorithm* findAlgorithm(const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,btPersistentManifold* sharedManifold, ebtDispatcherQueryType queryType) = 0;
85 
86  virtual btPersistentManifold* getNewManifold(const btCollisionObject* b0,const btCollisionObject* b1)=0;
87 
88  virtual void releaseManifold(btPersistentManifold* manifold)=0;
89 
90  virtual void clearManifold(btPersistentManifold* manifold)=0;
91 
92  virtual bool needsCollision(const btCollisionObject* body0,const btCollisionObject* body1) = 0;
93 
94  virtual bool needsResponse(const btCollisionObject* body0,const btCollisionObject* body1)=0;
95 
96  virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) =0;
97 
98  virtual int getNumManifolds() const = 0;
99 
100  virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0;
101 
102  virtual btPersistentManifold** getInternalManifoldPointer() = 0;
103 
104  virtual btPoolAllocator* getInternalManifoldPool() = 0;
105 
106  virtual const btPoolAllocator* getInternalManifoldPool() const = 0;
107 
108  virtual void* allocateCollisionAlgorithm(int size) = 0;
109 
110  virtual void freeCollisionAlgorithm(void* ptr) = 0;
111 
112 };
113 
114 
115 #endif //BT_DISPATCHER_H
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
btScalar m_convexConservativeDistanceThreshold
Definition: btDispatcher.h:65
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
bool m_useConvexConservativeDistanceUtil
Definition: btDispatcher.h:64
class btIDebugDraw * m_debugDraw
Definition: btDispatcher.h:59
The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
btScalar m_timeOfImpact
Definition: btDispatcher.h:57
btCollisionObject can be used to manage collision detection objects.
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations...
Definition: btIDebugDraw.h:29
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:62
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
btScalar m_allowedCcdPenetration
Definition: btDispatcher.h:63
The btPoolAllocator class allows to efficiently allocate a large pool of objects, instead of dynamica...
bool m_deterministicOverlappingPairs
Definition: btDispatcher.h:66
btScalar m_timeStep
Definition: btDispatcher.h:54
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
Definition: btDispatcher.h:77
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
ebtDispatcherQueryType
Definition: btDispatcher.h:69
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:292