Resolution#

enum nvResolutionState#

Collsion resolution states.

Values:

enumerator nvResolutionState_FIRST#

The collision just happened this frame.

enumerator nvResolutionState_NORMAL#

The collision has been existing.

enumerator nvResolutionState_CACHED#

The collision has been separated and the resolution is cached.

struct nvResolution#

Data structure that holds information about collision between two bodies.

Public Members

bool collision#

Flag that reports if the collision has happened.

nvBody *a#

First body of the collision.

nvBody *b#

Second body of the collision.

nvVector2 normal#

Normal vector of the collision separation.

nv_float depth#

Penetration depth.

nv_float friction#

Mixed friction coefficient.

nvResolutionState state#

State of the resolution.

int lifetime#

Remaining lifetime of the resolution in ticks.

nvContact contacts[2]#

Contact points.

nv_uint8 contact_count#

Contact point count.

struct nvContact#

Data structure that holds information about contacts of collision.

Public Members

nvVector2 position#

Position of the contact point.

nvVector2 ra#

Contact position relative to body A.

nvVector2 rb#

Contact position relative to body B.

nv_float velocity_bias#

Velocity bias for restitution.

nv_float position_bias#

Position bias for Baumgarte stabilization.

nv_float mass_normal#

Effective mass of normal impulse.

nv_float mass_tangent#

Effective mass of tangential impulse.

nv_float jn#

Accumulated normal impulse.

nv_float jt#

Accumulated tangential impulse.