Class: CP::SimpleMotor

Inherits:
Object
  • Object
show all
Defined in:
lib/chipmunk-ffi/constraints/simple_motor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#structObject (readonly)

Returns the value of attribute struct.



13
14
15
# File 'lib/chipmunk-ffi/constraints/simple_motor.rb', line 13

def struct
  @struct
end