Class: CP::SimpleMotor
- Inherits:
-
Object
- Object
- CP::SimpleMotor
- Includes:
- Constraint
- Defined in:
- lib/chipmunk-ffi/constraints/simple_motor.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, rate) ⇒ SimpleMotor
constructor
A new instance of SimpleMotor.
Methods included from Constraint
Constructor Details
#initialize(a_body, b_body, rate) ⇒ SimpleMotor
Returns a new instance of SimpleMotor.
15 16 17 18 19 |
# File 'lib/chipmunk-ffi/constraints/simple_motor.rb', line 15 def initialize(a_body, b_body, rate) @body_a, @body_b = a_body, b_body @struct = SimpleMotorStruct.new(CP.cpSimpleMotorNew( a_body.struct.pointer,b_body.struct.pointer,rate)) end |