Class: CP::SlideJoint

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

Constant Summary

Constants included from Constraint

Constraint::DampedRotarySpring, Constraint::DampedSpring, Constraint::GearJoint, Constraint::GrooveJoint, Constraint::PinJoint, Constraint::PivotJoint, Constraint::RatchetJoint, Constraint::RotaryLimitJoint, Constraint::SimpleMotor, Constraint::SlideJoint

Instance Attribute Summary

Attributes included from Constraint

#body_a, #body_b, #struct

Instance Method Summary collapse

Methods included from Constraint

included, #set_data_pointer

Constructor Details

#initialize(a_body, b_body, anchr_one, anchr_two, min, max) ⇒ SlideJoint

Returns a new instance of SlideJoint.



23
24
25
26
27
# File 'lib/chipmunk-ffi/constraints/slide_joint.rb', line 23

def initialize(a_body, b_body, anchr_one, anchr_two, min, max)
  @body_a, @body_b = a_body, b_body
  @struct = SlideJointStruct.new(CP.cpSlideJointNew(
    a_body.struct.pointer,b_body.struct.pointer,anchr_one.struct,anchr_two.struct,min,max))
end