MCPcopy Create free account
hub / github.com/axmolengine/axmol / queryPoint

Method queryPoint

core/physics/PhysicsWorld.cpp:487–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487void 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
505Vector<PhysicsShape*> PhysicsWorld::getShapes(const Vec2& point) const
506{

Callers 1

Calls 2

cpSpacePointQueryFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected