Add query function in PhysicsWorld2D.