Chipmunk2D Pro API Reference  6.1.5
 All Classes Functions Variables Typedefs Properties Groups Pages
Public Attributes | List of all members
cpConstraint Struct Reference

Opaque cpConstraint struct. More...

#include <cpConstraint.h>

Public Attributes

cpBodya
 The first body connected to this constraint.
 
cpBodyb
 The second body connected to this constraint.
 
cpFloat maxForce
 The maximum force that this constraint is allowed to use. More...
 
cpFloat errorBias
 The rate at which joint error is corrected. More...
 
cpFloat maxBias
 The maximum rate at which joint error is corrected. More...
 
cpConstraintPreSolveFunc preSolve
 Function called before the solver runs. More...
 
cpConstraintPostSolveFunc postSolve
 Function called after the solver runs. More...
 
cpDataPointer data
 User definable data pointer. More...
 

Detailed Description

Opaque cpConstraint struct.

Member Data Documentation

cpDataPointer cpConstraint::data

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.

cpFloat cpConstraint::errorBias

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.

cpFloat cpConstraint::maxBias

The maximum rate at which joint error is corrected.

Defaults to infinity.

cpFloat cpConstraint::maxForce

The maximum force that this constraint is allowed to use.

Defaults to infinity.

cpConstraintPostSolveFunc cpConstraint::postSolve

Function called after the solver runs.

Use the applied impulse to perform effects like breakable joints.

cpConstraintPreSolveFunc cpConstraint::preSolve

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: