Public Member Functions | Static Public Member Functions | Properties

ChipmunkDampedSpring Class Reference

A spring with a damper. More...

#import <ChipmunkConstraint.h>

Inherits ChipmunkConstraint.

List of all members.

Public Member Functions

(id) - initWithBodyA:bodyB:anchr1:anchr2:restLength:stiffness:damping:
 Initialize a damped spring between two bodies at the given anchor points.

Static Public Member Functions

(ChipmunkDampedSpring *) + dampedSpringWithBodyA:bodyB:anchr1:anchr2:restLength:stiffness:damping:
 Create an autoreleased damped spring between two bodies at the given anchor points.

Properties

cpVect anchr1
 The anchor point on the first body.
cpVect anchr2
 The anchor point on the second body.
cpFloat restLength
 The length the spring wants to contract or expand to.
cpFloat stiffness
 The young's modulus of the spring.
cpFloat damping
 The amount of viscous damping to apply.

Detailed Description

A spring with a damper.

While a spring is not technically a constraint, the damper is. The spring forces are simply a convenience.


Member Function Documentation

+ (ChipmunkDampedSpring *) dampedSpringWithBodyA: (ChipmunkBody *)  a
bodyB: (ChipmunkBody *)  b
anchr1: (cpVect anchr1
anchr2: (cpVect anchr2
restLength: (cpFloat)  restLength
stiffness: (cpFloat)  stiffness
damping: (cpFloat)  damping 

Create an autoreleased damped spring between two bodies at the given anchor points.

Parameters:
restLength The length the spring wants to contract or expand to.
stiffness The young's modulus of the spring.
damping The amount of viscous damping to apply.
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB: (ChipmunkBody *)  b
anchr1: (cpVect anchr1
anchr2: (cpVect anchr2
restLength: (cpFloat)  restLength
stiffness: (cpFloat)  stiffness
damping: (cpFloat)  damping 

Initialize a damped spring between two bodies at the given anchor points.

Parameters:
restLength The length the spring wants to contract or expand to.
stiffness The young's modulus of the spring.
damping The amount of viscous damping to apply.

The documentation for this class was generated from the following file:
 All Classes Functions Variables Properties