Class: CP::SimpleMotor
- Inherits:
-
Object
- Object
- CP::SimpleMotor
- Defined in:
- lib/chipmunk-ffi/constraints/simple_motor.rb
Instance Attribute Summary collapse
-
#struct ⇒ Object
readonly
Returns the value of attribute struct.
Instance Method Summary collapse
-
#initialize(a_body, b_body, rate) ⇒ SimpleMotor
constructor
A new instance of SimpleMotor.
Constructor Details
#initialize(a_body, b_body, rate) ⇒ SimpleMotor
Returns a new instance of SimpleMotor.
14 15 16 17 |
# File 'lib/chipmunk-ffi/constraints/simple_motor.rb', line 14 def initialize(a_body, b_body, rate) @struct = SimpleMotorStruct.new(CP.cpSimpleMotorNew( a_body.struct.pointer,b_body.struct.pointer,rate)) end |
Instance Attribute Details
#struct ⇒ Object (readonly)
Returns the value of attribute struct.
13 14 15 |
# File 'lib/chipmunk-ffi/constraints/simple_motor.rb', line 13 def struct @struct end |