| 485 | } |
| 486 | |
| 487 | void PhysicsWorld::queryPoint(PhysicsQueryPointCallbackFunc func, const Vec2& point, void* data) |
| 488 | { |
| 489 | AXASSERT(func != nullptr, "func shouldn't be nullptr"); |
| 490 | |
| 491 | if (func != nullptr) |
| 492 | { |
| 493 | if (!_delayAddBodies.empty() || !_delayRemoveBodies.empty()) |
| 494 | { |
| 495 | updateBodies(); |
| 496 | } |
| 497 | PointQueryCallbackInfo info = {this, func, data}; |
| 498 | |
| 499 | PhysicsWorldCallback::continues = true; |
| 500 | cpSpacePointQuery(_cpSpace, PhysicsHelper::vec22cpv(point), 0, CP_SHAPE_FILTER_ALL, |
| 501 | (cpSpacePointQueryFunc)PhysicsWorldCallback::queryPointFunc, &info); |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | Vector<PhysicsShape*> PhysicsWorld::getShapes(const Vec2& point) const |
| 506 | { |
no test coverage detected