Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
A potential contact between the chidren of two Fixture objects. More...
#include <Contact.hpp>
Public Types | |
using | substep_type = ts_iters_t |
using | ManifoldCalcFunc = Manifold(*)(const Fixture *fixtureA, child_count_t indexA, const Fixture *fixtureB, child_count_t indexB, const Manifold::Conf conf) |
Public Member Functions | |
Contact ()=delete | |
Contact (const Contact ©)=delete | |
Manifold & | GetManifold () noexcept |
Gets the contact manifold. More... | |
const Manifold & | GetManifold () const noexcept |
bool | IsTouching () const noexcept |
Is this contact touching? More... | |
void | SetEnabled (bool flag) noexcept |
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). More... | |
void | SetEnabled () noexcept |
Enables this contact. More... | |
void | UnsetEnabled () noexcept |
Disables this contact. More... | |
bool | IsEnabled () const noexcept |
Has this contact been disabled? More... | |
Fixture * | GetFixtureA () noexcept |
Gets fixture A in this contact. More... | |
const Fixture * | GetFixtureA () const noexcept |
Gets fixture A in this contact. More... | |
child_count_t | GetChildIndexA () const noexcept |
Get the child primitive index for fixture A. More... | |
Fixture * | GetFixtureB () noexcept |
Gets fixture B in this contact. More... | |
const Fixture * | GetFixtureB () const noexcept |
Gets fixture B in this contact. More... | |
child_count_t | GetChildIndexB () const noexcept |
Get the child primitive index for fixture B. More... | |
void | SetFriction (RealNum friction) noexcept |
Override the default friction mixture. You can call this in ContactListener::PreSolve. This value persists until set or reset. More... | |
RealNum | GetFriction () const noexcept |
Gets the combined friction of the two fixtures associated with this contact. More... | |
void | SetRestitution (RealNum restitution) noexcept |
Override the default restitution mixture. You can call this in ContactListener::PreSolve. The value persists until you set or reset. More... | |
RealNum | GetRestitution () const noexcept |
Get the restitution. More... | |
void | SetTangentSpeed (LinearVelocity speed) noexcept |
Set the desired tangent speed for a conveyor belt behavior. In meters per second. More... | |
LinearVelocity | GetTangentSpeed () const noexcept |
Gets the desired tangent speed. In meters per second. More... | |
Manifold | CalcManifold (const Manifold::Conf conf) const |
Calculates this contact's collision manifold. More... | |
substep_type | GetToiCount () const noexcept |
bool | HasValidToi () const noexcept |
Gets whether a TOI is set. More... | |
RealNum | GetToi () const |
Gets the time of impact (TOI) as a fraction. More... | |
void | FlagForFiltering () noexcept |
bool | NeedsFiltering () const noexcept |
Friends | |
class | ContactAtty |
A potential contact between the chidren of two Fixture objects.
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.
using box2d::Contact::ManifoldCalcFunc = Manifold (*)(const Fixture* fixtureA, child_count_t indexA, const Fixture* fixtureB, child_count_t indexB, const Manifold::Conf conf) |
|
delete |
|
delete |
|
inline |
Calculates this contact's collision manifold.
|
inlinenoexcept |
|
inlinenoexcept |
Get the child primitive index for fixture A.
|
inlinenoexcept |
Get the child primitive index for fixture B.
|
inlinenoexcept |
Gets fixture A in this contact.
|
inlinenoexcept |
Gets fixture A in this contact.
|
inlinenoexcept |
Gets fixture B in this contact.
|
inlinenoexcept |
Gets fixture B in this contact.
|
inlinenoexcept |
Gets the combined friction of the two fixtures associated with this contact.
|
inlinenoexcept |
Gets the contact manifold.
|
inlinenoexcept |
|
inlinenoexcept |
Get the restitution.
|
inlinenoexcept |
Gets the desired tangent speed. In meters per second.
|
inline |
Gets the time of impact (TOI) as a fraction.
|
inlinenoexcept |
|
inlinenoexcept |
Gets whether a TOI is set.
|
inlinenoexcept |
Has this contact been disabled?
|
inlinenoexcept |
Is this contact touching?
Touching is defined as either:
|
inlinenoexcept |
|
inlinenoexcept |
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).
|
inlinenoexcept |
Enables this contact.
|
inlinenoexcept |
Override the default friction mixture. You can call this in ContactListener::PreSolve. This value persists until set or reset.
|
inlinenoexcept |
Override the default restitution mixture. You can call this in ContactListener::PreSolve. The value persists until you set or reset.
|
inlinenoexcept |
Set the desired tangent speed for a conveyor belt behavior. In meters per second.
|
inlinenoexcept |
Disables this contact.
|
friend |