Class: CP::DampedSpring
- Inherits:
-
Object
- Object
- CP::DampedSpring
- Defined in:
- lib/chipmunk-ffi/constraints/damped_spring.rb
Instance Attribute Summary collapse
-
#struct ⇒ Object
readonly
Returns the value of attribute struct.
Instance Method Summary collapse
-
#initialize(a_body, b_body, anchr_one, anchr_two, rest_length, stiffness, damping) ⇒ DampedSpring
constructor
A new instance of DampedSpring.
Constructor Details
#initialize(a_body, b_body, anchr_one, anchr_two, rest_length, stiffness, damping) ⇒ DampedSpring
Returns a new instance of DampedSpring.
23 24 25 26 27 28 |
# File 'lib/chipmunk-ffi/constraints/damped_spring.rb', line 23 def initialize(a_body, b_body, anchr_one, anchr_two, rest_length, stiffness, damping) @struct = DampedSpringStruct.new(CP.cpDampedSpringNew( a_body.struct.pointer,b_body.struct.pointer,anchr_one.struct,anchr_two.struct, rest_length, stiffness, damping)) end |
Instance Attribute Details
#struct ⇒ Object (readonly)
Returns the value of attribute struct.
22 23 24 |
# File 'lib/chipmunk-ffi/constraints/damped_spring.rb', line 22 def struct @struct end |