void cpSpacePointQuery(cpSpace *space, cpVect point, cpLayers layers, cpGroup group, cpSpacePointQueryFunc func, void *data) { pointQueryContext context = {layers, group, func, data}; cpSpaceHashPointQuery(space->activeShapes, point, (cpSpaceHashQueryFunc)pointQueryHelper, &context); cpSpaceHashPointQuery(space->staticShapes, point, (cpSpaceHashQueryFunc)pointQueryHelper, &context); }
static void pointQuery(cpSpaceHash *hash, cpVect point, cpSpacePointQueryFunc func, void *data) { pointQueryFuncPair pair = {func, data}; cpSpaceHashPointQuery(hash, point, pointQueryHelper, &pair); }