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

Method getShape

core/physics/PhysicsWorld.cpp:514–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514PhysicsShape* PhysicsWorld::getShape(const Vec2& point) const
515{
516 cpShape* shape =
517 cpSpacePointQueryNearest(_cpSpace, PhysicsHelper::vec22cpv(point), 0, CP_SHAPE_FILTER_ALL, nullptr);
518 return shape == nullptr ? nullptr : static_cast<PhysicsShape*>(cpShapeGetUserData(shape));
519}
520
521bool PhysicsWorld::init()
522{

Callers

nothing calls this directly

Calls 2

cpSpacePointQueryNearestFunction · 0.85
cpShapeGetUserDataFunction · 0.85

Tested by

no test coverage detected