| 58 | } |
| 59 | |
| 60 | static cpCollisionID |
| 61 | NearestPointQueryNearest(struct PointQueryContext *context, cpShape *shape, cpCollisionID id, cpPointQueryInfo *out) |
| 62 | { |
| 63 | if( |
| 64 | !cpShapeFilterReject(shape->filter, context->filter) && !shape->sensor |
| 65 | ){ |
| 66 | cpPointQueryInfo info; |
| 67 | cpShapePointQuery(shape, context->point, &info); |
| 68 | |
| 69 | if(info.distance < out->distance) (*out) = info; |
| 70 | } |
| 71 | |
| 72 | return id; |
| 73 | } |
| 74 | |
| 75 | cpShape * |
| 76 | cpSpacePointQueryNearest(cpSpace *space, cpVect point, cpFloat maxDistance, cpShapeFilter filter, cpPointQueryInfo *out) |
nothing calls this directly
no test coverage detected