b2Contact Class Reference

#include <b2Contact.h>

Inheritance diagram for b2Contact:
b2CircleContact b2PolygonAndCircleContact b2PolygonContact

List of all members.

Public Member Functions

b2ManifoldGetManifold ()
const b2ManifoldGetManifold () const
void GetWorldManifold (b2WorldManifold *worldManifold) const
 Get the world manifold.
bool IsTouching () const
 Is this contact touching?
void SetEnabled (bool flag)
bool IsEnabled () const
 Has this contact been disabled?
b2ContactGetNext ()
 Get the next contact in the world's contact list.
const b2ContactGetNext () const
b2FixtureGetFixtureA ()
 Get the first fixture in this contact.
const b2FixtureGetFixtureA () const
b2FixtureGetFixtureB ()
 Get the second fixture in this contact.
const b2FixtureGetFixtureB () const
virtual void Evaluate (b2Manifold *manifold, const b2Transform &xfA, const b2Transform &xfB)=0
 Evaluate this contact with your own manifold and transforms.

Protected Types

enum  { e_islandFlag = 0x0001, e_touchingFlag = 0x0002, e_enabledFlag = 0x0004, e_filterFlag = 0x0008 }

Protected Member Functions

void FlagForFiltering ()
 Flag this contact for filtering. Filtering will occur the next time step.
 b2Contact ()
 b2Contact (b2Fixture *fixtureA, b2Fixture *fixtureB)
virtual ~b2Contact ()
void Update (b2ContactListener *listener)

Static Protected Member Functions

static void AddType (b2ContactCreateFcn *createFcn, b2ContactDestroyFcn *destroyFcn, b2Shape::Type typeA, b2Shape::Type typeB)
static void InitializeRegisters ()
static b2ContactCreate (b2Fixture *fixtureA, b2Fixture *fixtureB, b2BlockAllocator *allocator)
static void Destroy (b2Contact *contact, b2Shape::Type typeA, b2Shape::Type typeB, b2BlockAllocator *allocator)
static void Destroy (b2Contact *contact, b2BlockAllocator *allocator)

Protected Attributes

uint32 m_flags
b2Contactm_prev
b2Contactm_next
b2ContactEdge m_nodeA
b2ContactEdge m_nodeB
b2Fixturem_fixtureA
b2Fixturem_fixtureB
b2Manifold m_manifold
int32 m_toiCount

Static Protected Attributes

static b2ContactRegister s_registers [b2Shape::e_typeCount][b2Shape::e_typeCount]
static bool s_initialized = false

Friends

class b2ContactManager
class b2World
class b2ContactSolver
class b2Body
class b2Fixture

Detailed Description

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.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
e_islandFlag 
e_touchingFlag 
e_enabledFlag 
e_filterFlag 

Constructor & Destructor Documentation

b2Contact::b2Contact (  )  [inline, protected]
b2Contact::b2Contact ( b2Fixture fixtureA,
b2Fixture fixtureB 
) [protected]
virtual b2Contact::~b2Contact (  )  [inline, protected, virtual]

Member Function Documentation

void b2Contact::AddType ( b2ContactCreateFcn createFcn,
b2ContactDestroyFcn destroyFcn,
b2Shape::Type  typeA,
b2Shape::Type  typeB 
) [static, protected]
b2Contact * b2Contact::Create ( b2Fixture fixtureA,
b2Fixture fixtureB,
b2BlockAllocator allocator 
) [static, protected]
void b2Contact::Destroy ( b2Contact contact,
b2BlockAllocator allocator 
) [static, protected]
static void b2Contact::Destroy ( b2Contact contact,
b2Shape::Type  typeA,
b2Shape::Type  typeB,
b2BlockAllocator allocator 
) [static, protected]
virtual void b2Contact::Evaluate ( b2Manifold manifold,
const b2Transform xfA,
const b2Transform xfB 
) [pure virtual]

Evaluate this contact with your own manifold and transforms.

Implemented in b2CircleContact, b2PolygonAndCircleContact, and b2PolygonContact.

void b2Contact::FlagForFiltering (  )  [inline, protected]

Flag this contact for filtering. Filtering will occur the next time step.

const b2Fixture * b2Contact::GetFixtureA (  )  const [inline]
b2Fixture * b2Contact::GetFixtureA (  )  [inline]

Get the first fixture in this contact.

const b2Fixture * b2Contact::GetFixtureB (  )  const [inline]
b2Fixture * b2Contact::GetFixtureB (  )  [inline]

Get the second fixture in this contact.

const b2Manifold * b2Contact::GetManifold (  )  const [inline]
b2Manifold * b2Contact::GetManifold (  )  [inline]

Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.

const b2Contact * b2Contact::GetNext (  )  const [inline]
b2Contact * b2Contact::GetNext (  )  [inline]

Get the next contact in the world's contact list.

void b2Contact::GetWorldManifold ( b2WorldManifold worldManifold  )  const [inline]

Get the world manifold.

void b2Contact::InitializeRegisters (  )  [static, protected]
bool b2Contact::IsEnabled (  )  const [inline]

Has this contact been disabled?

bool b2Contact::IsTouching (  )  const [inline]

Is this contact touching?

void b2Contact::SetEnabled ( bool  flag  )  [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).

void b2Contact::Update ( b2ContactListener listener  )  [protected]

Friends And Related Function Documentation

friend class b2Body [friend]
friend class b2ContactManager [friend]
friend class b2ContactSolver [friend]
friend class b2Fixture [friend]
friend class b2World [friend]

Member Data Documentation

bool b2Contact::s_initialized = false [static, protected]

The documentation for this class was generated from the following files:
Generated on Sat Apr 3 18:18:09 2010 for Box2D by  doxygen 1.6.3