Class: CP::GearJoint
- Inherits:
-
Object
- Object
- CP::GearJoint
- Includes:
- Constraint
- Defined in:
- lib/chipmunk-ffi/constraints/gear_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, ratio) ⇒ GearJoint
constructor
A new instance of GearJoint.
- #ratio=(val) ⇒ Object
Methods included from Constraint
Constructor Details
#initialize(a_body, b_body, phase, ratio) ⇒ GearJoint
Returns a new instance of GearJoint.
20 21 22 23 24 |
# File 'lib/chipmunk-ffi/constraints/gear_joint.rb', line 20 def initialize(a_body, b_body, phase, ratio) @body_a, @body_b = a_body, b_body @struct = GearJointStruct.new(CP.cpGearJointNew( a_body.struct.pointer,b_body.struct.pointer,phase, ratio)) end |
Instance Method Details
#ratio=(val) ⇒ Object
26 27 28 |
# File 'lib/chipmunk-ffi/constraints/gear_joint.rb', line 26 def ratio=(val) CP.cpGearJointSetRatio(@struct.pointer,val) end |