Module: CP::Constraint
- Includes:
- Object
- Defined in:
- lib/chipmunk.rb,
ext/chipmunk/rb_cpConstraint.c
Instance Attribute Summary collapse
- #body_a ⇒ Object readonly
- #body_b ⇒ Object readonly
Instance Method Summary collapse
- #add_to_space(space) ⇒ Object
- #chipmunk_objects ⇒ Object
- #error_bias ⇒ Object
- #error_bias= ⇒ Object
- #impulse ⇒ Object
- #max_bias ⇒ Object
- #max_bias= ⇒ Object
- #max_force ⇒ Object
- #max_force= ⇒ Object
- #post_solve(*args) ⇒ Object
- #pre_solve(*args) ⇒ Object
- #remove_from_space(space) ⇒ Object
Instance Method Details
#add_to_space(space) ⇒ Object
81 82 83 |
# File 'lib/chipmunk.rb', line 81 def add_to_space(space) space.add_constraint(self) end |
#chipmunk_objects ⇒ Object
77 78 79 |
# File 'lib/chipmunk.rb', line 77 def chipmunk_objects [self] end |
#error_bias ⇒ Object
#error_bias= ⇒ Object
#impulse ⇒ Object
255 256 257 258 |
# File 'ext/chipmunk/rb_cpConstraint.c', line 255 static VALUE rb_cpConstraintGetImpulse(VALUE self) { return rb_float_new(cpConstraintGetImpulse(CONSTRAINT(self))); } |
#max_bias ⇒ Object
#max_bias= ⇒ Object
#max_force ⇒ Object
#max_force= ⇒ Object
#post_solve(*args) ⇒ Object
339 340 341 342 343 344 345 346 347 348 |
# File 'ext/chipmunk/rb_cpConstraint.c', line 339
static VALUE
rb_cpConstraintSetPostSolve(int argc, VALUE * argv, VALUE self) {
VALUE callback_block;
rb_scan_args(argc, argv, "0&", &callback_block);
rb_iv_set(self, "@_cp_post_solve", callback_block);
cpConstraintSetPostSolveFunc(CONSTRAINT(self), rb_cpConstraintPostSolveFunc);
return Qnil;
}
|
#pre_solve(*args) ⇒ Object
328 329 330 331 332 333 334 335 336 337 |
# File 'ext/chipmunk/rb_cpConstraint.c', line 328
static VALUE
rb_cpConstraintSetPreSolve(int argc, VALUE * argv, VALUE self) {
VALUE callback_block;
rb_scan_args(argc, argv, "0&", &callback_block);
rb_iv_set(self, "@_cp_pre_solve", callback_block);
cpConstraintSetPreSolveFunc(CONSTRAINT(self), rb_cpConstraintPreSolveFunc);
return Qnil;
}
|
#remove_from_space(space) ⇒ Object
85 86 87 |
# File 'lib/chipmunk.rb', line 85 def remove_from_space(space) space.remove_constraint(self) end |