Class: CP::PinJoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a_body, b_body, anchr_one, anchr_two) ⇒ PinJoint

Returns a new instance of PinJoint.



20
21
22
23
# File 'lib/chipmunk-ffi/constraints/pin_joint.rb', line 20

def initialize(a_body, b_body, anchr_one, anchr_two)
  @struct = PinJointStruct.new(CP.cpPinJointNew(
    a_body.struct.pointer,b_body.struct.pointer,anchr_one.struct,anchr_two.struct))
end

Instance Attribute Details

#structObject (readonly)

Returns the value of attribute struct.



19
20
21
# File 'lib/chipmunk-ffi/constraints/pin_joint.rb', line 19

def struct
  @struct
end