Chipmunk  6.0.3
Chipmunk API Reference for Kobold2D developers
cpConstraint Struct Reference

Opaque cpConstraint struct. More...

#include <cpConstraint.h>

Collaboration diagram for cpConstraint:

Public Member Functions

 CP_PRIVATE (const cpConstraintClass *klass)
 CP_PRIVATE (cpSpace *space)
 CP_PRIVATE (cpConstraint *next_a)
 CP_PRIVATE (cpConstraint *next_b)

Data Fields

cpBodya
 The first body connected to this constraint.
cpBodyb
 The second body connected to this constraint.
cpFloat maxForce
cpFloat errorBias
cpFloat maxBias
cpConstraintPreSolveFunc preSolve
cpConstraintPostSolveFunc postSolve
cpDataPointer data

Detailed Description

Opaque cpConstraint struct.


Member Function Documentation

cpConstraint::CP_PRIVATE ( const cpConstraintClass klass)
cpConstraint::CP_PRIVATE ( cpSpace space)
cpConstraint::CP_PRIVATE ( cpConstraint next_a)
cpConstraint::CP_PRIVATE ( cpConstraint next_b)

Field Documentation

The first body connected to this constraint.

The second body connected to this constraint.

User definable data pointer. Generally this points to your the game object class so you can access it when given a cpConstraint reference in a callback.

The rate at which joint error is corrected. Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of the error every 1/60th of a second.

The maximum rate at which joint error is corrected. Defaults to infinity.

The maximum force that this constraint is allowed to use. Defaults to infinity.

Function called after the solver runs. Use the applied impulse to perform effects like breakable joints.

Function called before the solver runs. Animate your joint anchors, update your motor torque, etc.


The documentation for this struct was generated from the following file: