Class: CP::RatchetJoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a_body, b_body, phase, ratchet) ⇒ RatchetJoint

Returns a new instance of RatchetJoint.



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

def initialize(a_body, b_body, phase, ratchet)
  @struct = RatchetJointStruct.new(CP.cpRatchetJointNew(
    a_body.struct.pointer,b_body.struct.pointer,phase,ratchet))
end

Instance Attribute Details

#structObject (readonly)

Returns the value of attribute struct.



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

def struct
  @struct
end