Method: CP::Shape#segment_query

Defined in:
ext/chipmunk/rb_cpShape.c

#segment_query(a, b) ⇒ Object



207
208
209
210
211
212
213
214
215
# File 'ext/chipmunk/rb_cpShape.c', line 207

static VALUE
rb_cpShapeSegmentQuery(VALUE self, VALUE a, VALUE b) {
  cpSegmentQueryInfo info;
  cpShapeSegmentQuery(SHAPE(self), *VGET(a), *VGET(b), &info);
  if(info.shape) {
    return rb_cpSegmentQueryInfoNew((VALUE)info.shape->data, rb_float_new(info.t), VNEW(info.n));
  }
  return Qnil;
}