Class: CP::GearJoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a_body, b_body, phase, ratio) ⇒ GearJoint

Returns a new instance of GearJoint.



17
18
19
20
# File 'lib/chipmunk-ffi/constraints/gear_joint.rb', line 17

def initialize(a_body, b_body, phase, ratio)
  @struct = GearJointStruct.new(CP.cpGearJointNew(
    a_body.struct.pointer,b_body.struct.pointer,phase, ratio))
end

Instance Attribute Details

#structObject (readonly)

Returns the value of attribute struct.



16
17
18
# File 'lib/chipmunk-ffi/constraints/gear_joint.rb', line 16

def struct
  @struct
end