Class: CP::RatchetJoint
- Inherits:
-
Object
- Object
- CP::RatchetJoint
- Includes:
- Constraint
- Defined in:
- lib/chipmunk-ffi/constraints/ratchet_joint.rb
Constant Summary
Constants included from Constraint
Constraint::DampedRotarySpring, Constraint::DampedSpring, Constraint::GearJoint, Constraint::GrooveJoint, Constraint::PinJoint, Constraint::PivotJoint, Constraint::RatchetJoint, Constraint::RotaryLimitJoint, Constraint::SimpleMotor, Constraint::SlideJoint
Instance Attribute Summary
Attributes included from Constraint
Instance Method Summary collapse
-
#initialize(a_body, b_body, phase, ratchet) ⇒ RatchetJoint
constructor
A new instance of RatchetJoint.
Methods included from Constraint
Constructor Details
#initialize(a_body, b_body, phase, ratchet) ⇒ RatchetJoint
Returns a new instance of RatchetJoint.
18 19 20 21 22 |
# File 'lib/chipmunk-ffi/constraints/ratchet_joint.rb', line 18 def initialize(a_body, b_body, phase, ratchet) @body_a, @body_b = a_body, b_body @struct = RatchetJointStruct.new(CP.cpRatchetJointNew( a_body.struct.pointer,b_body.struct.pointer,phase,ratchet)) end |