describes how two sprites are connected to one another (Chipmunk Physics Only) More...
Public Member Functions | |
activateBodies () | |
wake up sleeping or idle parts of a joint More... | |
Offset | getAnchor () |
gets the anchor point for the joint on the primary sprite for pin, slide and spring joints More... | |
number | getErrorBias () |
get the percentage of joint error than remains unfixed after one second More... | |
number | getGearInitialAngle () |
get the initial angular offset between the two sprites joined with a gear joint More... | |
number | getGearRatio () |
get the ratio of rotation between the two sprites joined with a gear joint More... | |
Offset | getGrooveEnd () |
get the position on the primary sprite of the end of the groove for a groove joint More... | |
Offset | getGrooveStart () |
get the position on the primary sprite of the start of the groove for a groove joint More... | |
number | getImpulse () |
get the last impulse applied by the joint More... | |
number | getMaxAngle () |
get the maximum angle allowed by a RotaryLimit joint More... | |
number | getMaxBias () |
get the maximum speed at which a joint can be error corrrected More... | |
number | getMaxForce () |
get the maximum force the joint can apply to the sprites More... | |
number | getMinAngle () |
get the minimum angle allowed by a RotaryLimit joint More... | |
number | getMotorSpinRate () |
get how fast the sprites rotate relative to one another in a motor joint More... | |
Offset | getOtherAnchor () |
gets the anchor point for the joint on the secondary sprite More... | |
Sprite | getOtherSprite () |
get the secondary Sprite for the joint More... | |
number | getPinDist () |
get the distance between the anchors on a pin joint More... | |
number | getRatchetAngle () |
get the current angle of a ratchet joint More... | |
number | getRatchetInterval () |
get the distance between backstops on a ratchet joint More... | |
number | getRatchetPhase () |
get the initial offset for the ratchet backstops on a ratchet joint More... | |
number | getRotarySpringRestAngle () |
get the angle between sprites at which a rotary spring is at rest on a rotary spring joint More... | |
number | getSlideMaxDist () |
get the maximum distance apart for the anchors of a slide joint More... | |
number | getSlideMinDist () |
get the minimum distance apart for the anchors of a slide joint More... | |
number | getSpringDamping () |
get the damping for a rotary spring or a spring joint More... | |
number | getSpringRestLength () |
get the distance between anchors at which the spring is at rest for a spring joint More... | |
number | getSpringStiffness () |
get the stiffness for a rotary spring or a spring joint More... | |
Sprite | getSprite () |
get the primary Sprite for the joint More... | |
string | getType () |
returns a string for the type of joint More... | |
CpConstraint | setAnchor (Offset inAnchor) |
sets the anchor point for the joint on the primary sprite for pin, slide and spring joints More... | |
CpConstraint | setErrorBias (number inErrorBias) |
set the percentage of joint error than remains unfixed after one second More... | |
CpConstraint | setGearInitialAngle (number inGearInitialAngle) |
set the initial angular offset between the two sprites joined with a gear joint More... | |
CpConstraint | setGearRatio (number inGearRatio) |
set the ratio of rotation between the two sprites joined with a gear joint More... | |
CpConstraint | setGrooveEnd (Offset inGrooveEnd) |
set the position on the primary sprite of the end of the groove for a groove joint More... | |
CpConstraint | setGrooveStart (Offset inGrooveStart) |
set the position on the primary sprite of the start of the groove for a groove joint More... | |
CpConstraint | setMaxAngle (number inMaxAngle) |
set the maximum angle allowed by a RotaryLimit joint More... | |
CpConstraint | setMaxBias (number inMaxBias) |
set the maximum speed at which a joint can be error corrrected More... | |
CpConstraint | setMaxForce (number inMaxForce) |
set the maximum force the joint can apply to the sprites More... | |
CpConstraint | setMinAngle (number inMinAngle) |
set the minimum angle allowed by a RotaryLimit joint More... | |
CpConstraint | setMotorSpinRate (number inMotorSpinRate) |
set how fast the sprites rotate relative to one another in a motor joint More... | |
CpConstraint | setOtherAnchor (Offset inOtherAnchor) |
sets the anchor point for the joint on the secondary sprite More... | |
CpConstraint | setPinDist (number inPinDist) |
set the distance between the anchors on a pin joint More... | |
CpConstraint | setRatchetAngle (number inRatchetAngle) |
set the current angle of a ratchet joint More... | |
CpConstraint | setRatchetInterval (number inRatchetInterval) |
set the distance between backstops on a ratchet joint More... | |
CpConstraint | setRatchetPhase (number inRatchetPhase) |
set the initial offset for the ratchet backstops on a ratchet joint More... | |
CpConstraint | setRotarySpringRestAngle (number inRotarySpringRestAngle) |
set the angle between sprites at which a rotary spring is at rest on a rotary spring joint More... | |
CpConstraint | setSlideMaxDist (number inSlideMaxDist) |
set the maximum disable apart for the anchors of a slide joint More... | |
CpConstraint | setSlideMinDist (number inSlideMinDist) |
set the minimum distance apart for the anchors of a slide joint More... | |
CpConstraint | setSpringDamping (number inSpringDamping) |
set the damping for a rotary spring or a spring joint More... | |
CpConstraint | setSpringRestLength (number inSpringRestLength) |
set the distance between anchors at which the spring is at rest for a spring joint More... | |
CpConstraint | setSpringStiffness (number inSpringStiffness) |
set the stiffness for a rotary spring or a spring joint More... | |
describes how two sprites are connected to one another (Chipmunk Physics Only)
Setup of joints can be done directly through methods of the Sprite object. The CpConstraint object exists to allow joints to be modified dynamically after they've been set up, such as by changing the range of motion on a damaged joint.
activateBodies | ( | ) |
wake up sleeping or idle parts of a joint
Calls Chipmunk's cpBodyActivate() for both of the joined bodies.
getAnchor | ( | ) |
gets the anchor point for the joint on the primary sprite for pin, slide and spring joints
getErrorBias | ( | ) |
get the percentage of joint error than remains unfixed after one second
getGearInitialAngle | ( | ) |
get the initial angular offset between the two sprites joined with a gear joint
getGearRatio | ( | ) |
get the ratio of rotation between the two sprites joined with a gear joint
getGrooveEnd | ( | ) |
get the position on the primary sprite of the end of the groove for a groove joint
getGrooveStart | ( | ) |
get the position on the primary sprite of the start of the groove for a groove joint
getImpulse | ( | ) |
get the last impulse applied by the joint
getMaxAngle | ( | ) |
get the maximum angle allowed by a RotaryLimit joint
getMaxBias | ( | ) |
get the maximum speed at which a joint can be error corrrected
getMaxForce | ( | ) |
get the maximum force the joint can apply to the sprites
getMinAngle | ( | ) |
get the minimum angle allowed by a RotaryLimit joint
getMotorSpinRate | ( | ) |
get how fast the sprites rotate relative to one another in a motor joint
getOtherAnchor | ( | ) |
gets the anchor point for the joint on the secondary sprite
getOtherSprite | ( | ) |
get the secondary Sprite for the joint
When you create a joint in the PDG Engine, you do this by calling one of the Joint or Limit functions of a Sprite, and passing in another Sprite as a parameter. The sprite that you passed in as a parameter is the secondary Sprite.
getPinDist | ( | ) |
get the distance between the anchors on a pin joint
getRatchetAngle | ( | ) |
get the current angle of a ratchet joint
getRatchetInterval | ( | ) |
get the distance between backstops on a ratchet joint
getRatchetPhase | ( | ) |
get the initial offset for the ratchet backstops on a ratchet joint
getRotarySpringRestAngle | ( | ) |
get the angle between sprites at which a rotary spring is at rest on a rotary spring joint
getSlideMaxDist | ( | ) |
get the maximum distance apart for the anchors of a slide joint
getSlideMinDist | ( | ) |
get the minimum distance apart for the anchors of a slide joint
getSpringDamping | ( | ) |
get the damping for a rotary spring or a spring joint
getSpringRestLength | ( | ) |
get the distance between anchors at which the spring is at rest for a spring joint
getSpringStiffness | ( | ) |
get the stiffness for a rotary spring or a spring joint
getSprite | ( | ) |
get the primary Sprite for the joint
When you create a joint in the PDG Engine, you do this by calling one of the Joint or Limit functions of a Sprite. The sprite that you called the Joint function for is the primary Sprite.
getType | ( | ) |
returns a string for the type of joint
setAnchor | ( | Offset | inAnchor | ) |
sets the anchor point for the joint on the primary sprite for pin, slide and spring joints
setErrorBias | ( | number | inErrorBias | ) |
set the percentage of joint error than remains unfixed after one second
setGearInitialAngle | ( | number | inGearInitialAngle | ) |
set the initial angular offset between the two sprites joined with a gear joint
setGearRatio | ( | number | inGearRatio | ) |
set the ratio of rotation between the two sprites joined with a gear joint
setGrooveEnd | ( | Offset | inGrooveEnd | ) |
set the position on the primary sprite of the end of the groove for a groove joint
setGrooveStart | ( | Offset | inGrooveStart | ) |
set the position on the primary sprite of the start of the groove for a groove joint
setMaxAngle | ( | number | inMaxAngle | ) |
set the maximum angle allowed by a RotaryLimit joint
setMaxBias | ( | number | inMaxBias | ) |
set the maximum speed at which a joint can be error corrrected
setMaxForce | ( | number | inMaxForce | ) |
set the maximum force the joint can apply to the sprites
setMinAngle | ( | number | inMinAngle | ) |
set the minimum angle allowed by a RotaryLimit joint
setMotorSpinRate | ( | number | inMotorSpinRate | ) |
set how fast the sprites rotate relative to one another in a motor joint
setOtherAnchor | ( | Offset | inOtherAnchor | ) |
sets the anchor point for the joint on the secondary sprite
setPinDist | ( | number | inPinDist | ) |
set the distance between the anchors on a pin joint
setRatchetAngle | ( | number | inRatchetAngle | ) |
set the current angle of a ratchet joint
setRatchetInterval | ( | number | inRatchetInterval | ) |
set the distance between backstops on a ratchet joint
setRatchetPhase | ( | number | inRatchetPhase | ) |
set the initial offset for the ratchet backstops on a ratchet joint
setRotarySpringRestAngle | ( | number | inRotarySpringRestAngle | ) |
set the angle between sprites at which a rotary spring is at rest on a rotary spring joint
setSlideMaxDist | ( | number | inSlideMaxDist | ) |
set the maximum disable apart for the anchors of a slide joint
setSlideMinDist | ( | number | inSlideMinDist | ) |
set the minimum distance apart for the anchors of a slide joint
setSpringDamping | ( | number | inSpringDamping | ) |
set the damping for a rotary spring or a spring joint
setSpringRestLength | ( | number | inSpringRestLength | ) |
set the distance between anchors at which the spring is at rest for a spring joint
setSpringStiffness | ( | number | inSpringStiffness | ) |
set the stiffness for a rotary spring or a spring joint