new Arbiter(a, b)
- Source:
Properties:
| Name | Type | Description | 
|---|---|---|
| a | cp.Shape | |
| b | cp.Shape | 
    A colliding pair of shapes.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| a | cp.Shape | |
| b | cp.Shape | 
Members
e :number
- Source:
    Calculated value to use for the elasticity coefficient.
Override in a pre-solve collision handler for custom behavior.
    Type:
- number
surface_vr :cp.Vect
- Source:
- Default Value:
- vzero
 
    Calculated value to use for applying surface velocities.
Override in a pre-solve collision handler for custom behavior.
    Type:
u :number
- Source:
    Calculated value to use for the friction coefficient.
Override in a pre-solve collision handler for custom behavior.
    Type:
- number
Methods
applyCachedImpulse(dt_coef)
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| dt_coef | number | 
applyImpulse()
- Source:
callSeparate(space)
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| space | cp.Space | 
getA() → {cp.Shape}
- Source:
    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.
Returns:
- Type
- cp.Shape
getB() → {cp.Shape}
- Source:
Returns:
- Type
- cp.Shape
getContactPointSet() → {Array.<ContactPoint>}
- Source:
    Return a contact set from an arbiter.
Returns:
- Type
- Array.<ContactPoint>
getDepth(i) → {number}
- Source:
    Get the depth of the ith contact point.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| i | number | Index of target contact point. | 
Returns:
- Type
- number
getNormal(i) → {cp.Vect}
- Source:
    Get the normal of the ith contact point.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| i | number | Index of target contact point. | 
Returns:
- Type
- cp.Vect
getPoint(i)
- Source:
    Get the position of the ith contact point.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| i | number | Index of target contact point. | 
getShapes() → {Array.<cp.Shape>}
- Source:
    Return the colliding shapes involved for this arbiter.
Returns:
    Array of colliding shapes.
- Type
- Array.<cp.Shape>
ignore()
- Source:
    Causes a collision pair to be ignored as if you returned false from a begin callback.
If called from a pre-step callback, you will still need to return false
if you want it to be ignored in the current step.
        
            
    
    isFirstContact() → {boolean}
- Source:
    Returns true if this is the first step a pair of objects started colliding.
Returns:
- Type
- boolean
next(body) → {Arbiter}
- Source:
    From chipmunk_private.h
    Parameters:
| Name | Type | Description | 
|---|---|---|
| body | cp.Body | 
Returns:
- Type
- Arbiter
preStep(dt, slop, bias)
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| dt | number | |
| slop | number | |
| bias | number | 
totalImpulse() → {cp.Vect}
- Source:
    Calculate the total impulse that was applied by this arbiter.
This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback.
Returns:
- Type
- cp.Vect
totalImpulseWithFriction() → {cp.Vect}
- Source:
    Calculate the total impulse including the friction that was applied by this arbiter.
This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback.
Returns:
- Type
- cp.Vect
totalKE() → {number}
- Source:
    Calculate the amount of energy lost in a collision including static, but not dynamic friction.
This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback.
Returns:
- Type
- number
unthread()
- Source:
update(contacts, handler, a, b)
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| contacts | Array.<Contact> | |
| handler | cp.CollisionHandler | |
| a | cp.Shape | |
| b | cp.Shape |