dchip.cpArbiter

Undocumented in source.

Members

Aliases

cpCollisionBeginFunc
alias cpCollisionBeginFunc = cpBool function(cpArbiter* arb, cpSpace* space, void* data)

The cpArbiter struct controls pairs of colliding shapes. They are also used in conjuction with collision handler callbacks allowing you to retrieve information on the collision and control it. Collision begin event function callback type. Returning false from a begin callback causes the collision to be ignored until the the separate callback is called when the objects stop colliding.

cpCollisionPostSolveFunc
alias cpCollisionPostSolveFunc = void function(cpArbiter* arb, cpSpace* space, void* data)

Collision post-solve event function callback type.

cpCollisionPreSolveFunc
alias cpCollisionPreSolveFunc = cpBool function(cpArbiter* arb, cpSpace* space, void* data)

Collision pre-solve event function callback type. Returning false from a pre-step callback causes the collision to be ignored until the next step.

cpCollisionSeparateFunc
alias cpCollisionSeparateFunc = void function(cpArbiter* arb, cpSpace* space, void* data)

Collision separate event function callback type.

Enums

cpArbiterState
enum cpArbiterState

@private

Functions

CP_ARBITER_GET_SHAPES
string CP_ARBITER_GET_SHAPES()

A macro shortcut for defining and retrieving the shapes from an arbiter.

cpArbiterApplyCachedImpulse
void cpArbiterApplyCachedImpulse(cpArbiter* arb, cpFloat dt_coef)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterApplyImpulse
void cpArbiterApplyImpulse(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterGetBodies
void cpArbiterGetBodies(cpArbiter* arb, cpBody** a, cpBody** b)

Return the colliding bodies involved for this arbiter. The order of the cpSpace.collision_type the bodies are associated with values will match the order set when the collision handler was registered.

cpArbiterGetContactPointSet
cpContactPointSet cpArbiterGetContactPointSet(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterGetCount
int cpArbiterGetCount(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterGetDepth
cpFloat cpArbiterGetDepth(cpArbiter* arb, int i)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterGetNormal
cpVect cpArbiterGetNormal(cpArbiter* arb, int i)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterGetPoint
cpVect cpArbiterGetPoint(cpArbiter* arb, int i)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterGetShapes
void cpArbiterGetShapes(cpArbiter* arb, cpShape** a, cpShape** b)

Return the colliding shapes involved for this arbiter. The order of their cpSpace.collision_type values will match the order set when the collision handler was registered.

cpArbiterGetSurfaceVelocity
cpVect cpArbiterGetSurfaceVelocity(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterIgnore
void cpArbiterIgnore(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterInit
cpArbiter* cpArbiterInit(cpArbiter* arb, cpShape* a, cpShape* b)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterIsFirstContact
cpBool cpArbiterIsFirstContact(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterPreStep
void cpArbiterPreStep(cpArbiter* arb, cpFloat dt, cpFloat slop, cpFloat bias)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterSetContactPointSet
void cpArbiterSetContactPointSet(cpArbiter* arb, cpContactPointSet* set)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterSetSurfaceVelocity
void cpArbiterSetSurfaceVelocity(cpArbiter* arb, cpVect vr)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterTotalImpulse
cpVect cpArbiterTotalImpulse(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterTotalImpulseWithFriction
cpVect cpArbiterTotalImpulseWithFriction(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterTotalKE
cpFloat cpArbiterTotalKE(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterUnthread
void cpArbiterUnthread(cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
cpArbiterUpdate
void cpArbiterUpdate(cpArbiter* arb, cpContact* contacts, int numContacts, cpCollisionHandler* handler, cpShape* a, cpShape* b)
Undocumented in source. Be warned that the author may not have intended to support it.
cpContactInit
cpContact* cpContactInit(cpContact* con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash)
Undocumented in source. Be warned that the author may not have intended to support it.
unthreadHelper
void unthreadHelper(cpArbiter* arb, cpBody* body_)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

CP_MAX_CONTACTS_PER_ARBITER
enum CP_MAX_CONTACTS_PER_ARBITER;
Undocumented in source.

Mixins

__anonymous
mixin _ExportEnumMembers!cpArbiterState
__anonymous
mixin CP_DefineArbiterStructProperty!(cpFloat, "e", "Elasticity")
Undocumented in source.
__anonymous
mixin CP_DefineArbiterStructProperty!(cpFloat, "u", "Friction")
Undocumented in source.
__anonymous
mixin CP_DefineArbiterStructProperty!(cpDataPointer, "data", "UserData")
Undocumented in source.

Mixin templates

CP_DefineArbiterStructGetter
mixintemplate CP_DefineArbiterStructGetter(type, string member, string name)
Undocumented in source.
CP_DefineArbiterStructProperty
mixintemplate CP_DefineArbiterStructProperty(type, string member, string name)
Undocumented in source.
CP_DefineArbiterStructSetter
mixintemplate CP_DefineArbiterStructSetter(type, string member, string name)
Undocumented in source.

Structs

cpArbiter
struct cpArbiter

A colliding pair of shapes.

cpArbiterThread
struct cpArbiterThread

@private

cpCollisionHandler
struct cpCollisionHandler

@private

cpContactPointSet
struct cpContactPointSet

A struct that wraps up the important collision data for an arbiter.

Templates

CP_ARBITER_GET_BODIES
template CP_ARBITER_GET_BODIES(string arb, string a, string b)

A macro shortcut for defining and retrieving the bodies from an arbiter.

Meta