#include <b2Contact.h>
Public Member Functions | |
virtual void | Evaluate (b2Manifold *manifold, const b2Transform &xfA, const b2Transform &xfB)=0 |
Evaluate this contact with your own manifold and transforms. More... | |
int32 | GetChildIndexA () const |
Get the child primitive index for fixture A. More... | |
int32 | GetChildIndexB () const |
Get the child primitive index for fixture B. More... | |
b2Fixture * | GetFixtureA () |
Get fixture A in this contact. More... | |
const b2Fixture * | GetFixtureA () const |
b2Fixture * | GetFixtureB () |
Get fixture B in this contact. More... | |
const b2Fixture * | GetFixtureB () const |
float32 | GetFriction () const |
Get the friction. More... | |
b2Manifold * | GetManifold () |
const b2Manifold * | GetManifold () const |
b2Contact * | GetNext () |
Get the next contact in the world's contact list. More... | |
const b2Contact * | GetNext () const |
float32 | GetRestitution () const |
Get the restitution. More... | |
float32 | GetTangentSpeed () const |
Get the desired tangent speed. In meters per second. More... | |
void | GetWorldManifold (b2WorldManifold *worldManifold) const |
Get the world manifold. More... | |
bool | IsEnabled () const |
Has this contact been disabled? More... | |
bool | IsTouching () const |
Is this contact touching? More... | |
void | ResetFriction () |
Reset the friction mixture to the default value. More... | |
void | ResetRestitution () |
Reset the restitution to the default value. More... | |
void | SetEnabled (bool flag) |
void | SetFriction (float32 friction) |
void | SetRestitution (float32 restitution) |
void | SetTangentSpeed (float32 speed) |
Set the desired tangent speed for a conveyor belt behavior. In meters per second. More... | |
Protected Types | |
enum | { e_islandFlag = 0x0001, e_touchingFlag = 0x0002, e_enabledFlag = 0x0004, e_filterFlag = 0x0008, e_bulletHitFlag = 0x0010, e_toiFlag = 0x0020 } |
Protected Member Functions | |
b2Contact () | |
b2Contact (b2Fixture *fixtureA, int32 indexA, b2Fixture *fixtureB, int32 indexB) | |
void | FlagForFiltering () |
Flag this contact for filtering. Filtering will occur the next time step. More... | |
void | Update (b2ContactListener *listener) |
virtual | ~b2Contact () |
Static Protected Member Functions | |
static void | AddType (b2ContactCreateFcn *createFcn, b2ContactDestroyFcn *destroyFcn, b2Shape::Type typeA, b2Shape::Type typeB) |
static b2Contact * | Create (b2Fixture *fixtureA, int32 indexA, b2Fixture *fixtureB, int32 indexB, b2BlockAllocator *allocator) |
static void | Destroy (b2Contact *contact, b2Shape::Type typeA, b2Shape::Type typeB, b2BlockAllocator *allocator) |
static void | Destroy (b2Contact *contact, b2BlockAllocator *allocator) |
static void | InitializeRegisters () |
Static Protected Attributes | |
static bool | s_initialized = false |
static b2ContactRegister | s_registers [b2Shape::e_typeCount][b2Shape::e_typeCount] |
Friends | |
class | b2Body |
class | b2ContactManager |
class | b2ContactSolver |
class | b2Fixture |
class | b2World |
The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.
Definition at line 77 of file b2Contact.h.
|
protected |
Enumerator | |
---|---|
e_islandFlag | |
e_touchingFlag | |
e_enabledFlag | |
e_filterFlag | |
e_bulletHitFlag | |
e_toiFlag |
Definition at line 155 of file b2Contact.h.
|
inlineprotected |
Definition at line 186 of file b2Contact.h.
|
protected |
Definition at line 126 of file b2Contact.cpp.
|
inlineprotectedvirtual |
Definition at line 188 of file b2Contact.h.
|
staticprotected |
Definition at line 51 of file b2Contact.cpp.
|
staticprotected |
Definition at line 69 of file b2Contact.cpp.
|
staticprotected |
|
staticprotected |
Definition at line 101 of file b2Contact.cpp.
|
pure virtual |
Evaluate this contact with your own manifold and transforms.
Implemented in b2ChainAndCircleContact, b2ChainAndPolygonContact, b2CircleContact, b2EdgeAndCircleContact, b2EdgeAndPolygonContact, b2PolygonContact, and b2PolygonAndCircleContact.
|
inlineprotected |
Flag this contact for filtering. Filtering will occur the next time step.
Definition at line 304 of file b2Contact.h.
|
inline |
Get the child primitive index for fixture A.
Definition at line 289 of file b2Contact.h.
|
inline |
Get the child primitive index for fixture B.
Definition at line 299 of file b2Contact.h.
|
inline |
Get fixture A in this contact.
Definition at line 274 of file b2Contact.h.
Definition at line 279 of file b2Contact.h.
|
inline |
Get fixture B in this contact.
Definition at line 284 of file b2Contact.h.
Definition at line 294 of file b2Contact.h.
|
inline |
Get the friction.
Definition at line 314 of file b2Contact.h.
|
inline |
Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.
Definition at line 222 of file b2Contact.h.
|
inline |
Definition at line 227 of file b2Contact.h.
|
inline |
Get the next contact in the world's contact list.
Definition at line 264 of file b2Contact.h.
Definition at line 269 of file b2Contact.h.
|
inline |
Get the restitution.
Definition at line 329 of file b2Contact.h.
|
inline |
Get the desired tangent speed. In meters per second.
Definition at line 344 of file b2Contact.h.
|
inline |
Get the world manifold.
Definition at line 232 of file b2Contact.h.
|
staticprotected |
Definition at line 40 of file b2Contact.cpp.
|
inline |
Has this contact been disabled?
Definition at line 254 of file b2Contact.h.
|
inline |
Is this contact touching?
Definition at line 259 of file b2Contact.h.
|
inline |
Reset the friction mixture to the default value.
Definition at line 319 of file b2Contact.h.
|
inline |
Reset the restitution to the default value.
Definition at line 334 of file b2Contact.h.
|
inline |
Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the current time step (or sub-step in continuous collisions).
Definition at line 242 of file b2Contact.h.
Override the default friction mixture. You can call this in b2ContactListener::PreSolve. This value persists until set or reset.
Definition at line 309 of file b2Contact.h.
Override the default restitution mixture. You can call this in b2ContactListener::PreSolve. The value persists until you set or reset.
Definition at line 324 of file b2Contact.h.
Set the desired tangent speed for a conveyor belt behavior. In meters per second.
Definition at line 339 of file b2Contact.h.
|
protected |
Definition at line 161 of file b2Contact.cpp.
|
friend |
Definition at line 151 of file b2Contact.h.
|
friend |
Definition at line 148 of file b2Contact.h.
|
friend |
Definition at line 150 of file b2Contact.h.
|
friend |
Definition at line 152 of file b2Contact.h.
|
friend |
Definition at line 149 of file b2Contact.h.
|
protected |
Definition at line 205 of file b2Contact.h.
|
protected |
Definition at line 206 of file b2Contact.h.
|
protected |
Definition at line 195 of file b2Contact.h.
|
protected |
Definition at line 216 of file b2Contact.h.
|
protected |
Definition at line 208 of file b2Contact.h.
|
protected |
Definition at line 209 of file b2Contact.h.
|
protected |
Definition at line 211 of file b2Contact.h.
|
protected |
Definition at line 199 of file b2Contact.h.
|
protected |
Definition at line 202 of file b2Contact.h.
|
protected |
Definition at line 203 of file b2Contact.h.
|
protected |
Definition at line 198 of file b2Contact.h.
|
protected |
Definition at line 217 of file b2Contact.h.
|
protected |
Definition at line 219 of file b2Contact.h.
|
protected |
Definition at line 214 of file b2Contact.h.
|
protected |
Definition at line 213 of file b2Contact.h.
|
staticprotected |
Definition at line 193 of file b2Contact.h.
|
staticprotected |
Definition at line 192 of file b2Contact.h.