#include <b2_contact.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 |
float | 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 |
float | GetRestitution () const |
Get the restitution. More... | |
float | GetRestitutionThreshold () const |
Get the restitution threshold. More... | |
float | 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 | ResetRestitutionThreshold () |
Reset the restitution threshold to the default value. More... | |
void | SetEnabled (bool flag) |
void | SetFriction (float friction) |
void | SetRestitution (float restitution) |
void | SetRestitutionThreshold (float threshold) |
void | SetTangentSpeed (float 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 () |
Protected Attributes | |
b2Fixture * | m_fixtureA |
b2Fixture * | m_fixtureB |
uint32 | m_flags |
float | m_friction |
int32 | m_indexA |
int32 | m_indexB |
b2Manifold | m_manifold |
b2Contact * | m_next |
b2ContactEdge | m_nodeA |
b2ContactEdge | m_nodeB |
b2Contact * | m_prev |
float | m_restitution |
float | m_restitutionThreshold |
float | m_tangentSpeed |
float | m_toi |
int32 | m_toiCount |
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 88 of file b2_contact.h.
|
protected |
Enumerator | |
---|---|
e_islandFlag | |
e_touchingFlag | |
e_enabledFlag | |
e_filterFlag | |
e_bulletHitFlag | |
e_toiFlag |
Definition at line 176 of file b2_contact.h.
|
inlineprotected |
Definition at line 207 of file b2_contact.h.
|
protected |
Definition at line 130 of file b2_contact.cpp.
|
inlineprotectedvirtual |
Definition at line 209 of file b2_contact.h.
|
staticprotected |
Definition at line 55 of file b2_contact.cpp.
|
staticprotected |
Definition at line 73 of file b2_contact.cpp.
|
staticprotected |
|
staticprotected |
Definition at line 105 of file b2_contact.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 326 of file b2_contact.h.
|
inline |
Get the child primitive index for fixture A.
Definition at line 311 of file b2_contact.h.
|
inline |
Get the child primitive index for fixture B.
Definition at line 321 of file b2_contact.h.
|
inline |
Get fixture A in this contact.
Definition at line 296 of file b2_contact.h.
|
inline |
Definition at line 301 of file b2_contact.h.
|
inline |
Get fixture B in this contact.
Definition at line 306 of file b2_contact.h.
|
inline |
Definition at line 316 of file b2_contact.h.
|
inline |
Get the friction.
Definition at line 336 of file b2_contact.h.
|
inline |
Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.
Definition at line 244 of file b2_contact.h.
|
inline |
Definition at line 249 of file b2_contact.h.
|
inline |
Get the next contact in the world's contact list.
Definition at line 286 of file b2_contact.h.
|
inline |
Definition at line 291 of file b2_contact.h.
|
inline |
Get the restitution.
Definition at line 351 of file b2_contact.h.
|
inline |
Get the restitution threshold.
Definition at line 366 of file b2_contact.h.
|
inline |
Get the desired tangent speed. In meters per second.
Definition at line 381 of file b2_contact.h.
|
inline |
Get the world manifold.
Definition at line 254 of file b2_contact.h.
|
staticprotected |
Definition at line 44 of file b2_contact.cpp.
|
inline |
Has this contact been disabled?
Definition at line 276 of file b2_contact.h.
|
inline |
Is this contact touching?
Definition at line 281 of file b2_contact.h.
|
inline |
Reset the friction mixture to the default value.
Definition at line 341 of file b2_contact.h.
|
inline |
Reset the restitution to the default value.
Definition at line 356 of file b2_contact.h.
|
inline |
Reset the restitution threshold to the default value.
Definition at line 371 of file b2_contact.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 264 of file b2_contact.h.
|
inline |
Override the default friction mixture. You can call this in b2ContactListener::PreSolve. This value persists until set or reset.
Definition at line 331 of file b2_contact.h.
|
inline |
Override the default restitution mixture. You can call this in b2ContactListener::PreSolve. The value persists until you set or reset.
Definition at line 346 of file b2_contact.h.
|
inline |
Override the default restitution velocity threshold mixture. You can call this in b2ContactListener::PreSolve. The value persists until you set or reset.
Definition at line 361 of file b2_contact.h.
|
inline |
Set the desired tangent speed for a conveyor belt behavior. In meters per second.
Definition at line 376 of file b2_contact.h.
|
protected |
Definition at line 166 of file b2_contact.cpp.
|
friend |
Definition at line 172 of file b2_contact.h.
|
friend |
Definition at line 169 of file b2_contact.h.
|
friend |
Definition at line 171 of file b2_contact.h.
|
friend |
Definition at line 173 of file b2_contact.h.
|
friend |
Definition at line 170 of file b2_contact.h.
|
protected |
Definition at line 226 of file b2_contact.h.
|
protected |
Definition at line 227 of file b2_contact.h.
|
protected |
Definition at line 216 of file b2_contact.h.
|
protected |
Definition at line 237 of file b2_contact.h.
|
protected |
Definition at line 229 of file b2_contact.h.
|
protected |
Definition at line 230 of file b2_contact.h.
|
protected |
Definition at line 232 of file b2_contact.h.
|
protected |
Definition at line 220 of file b2_contact.h.
|
protected |
Definition at line 223 of file b2_contact.h.
|
protected |
Definition at line 224 of file b2_contact.h.
|
protected |
Definition at line 219 of file b2_contact.h.
|
protected |
Definition at line 238 of file b2_contact.h.
|
protected |
Definition at line 239 of file b2_contact.h.
|
protected |
Definition at line 241 of file b2_contact.h.
|
protected |
Definition at line 235 of file b2_contact.h.
|
protected |
Definition at line 234 of file b2_contact.h.
|
staticprotected |
Definition at line 214 of file b2_contact.h.
|
staticprotected |
Definition at line 213 of file b2_contact.h.