Method: CP::Shape#nearest_point_query
- Defined in:
- ext/chipmunk/rb_cpShape.c
#nearest_point_query(point) ⇒ Object
196 197 198 199 200 201 202 203 204 |
# File 'ext/chipmunk/rb_cpShape.c', line 196
static VALUE
rb_cpShapeNearestPointQuery(VALUE self, VALUE point) {
cpNearestPointQueryInfo info;
cpShapeNearestPointQuery(SHAPE(self), *VGET(point), &info);
if(info.shape) {
return rb_cpNearestPointQueryInfoNew((VALUE)info.shape->data, VNEW(info.p), rb_float_new(info.d));
}
return Qnil;
}
|