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

Method getBody

core/physics/PhysicsWorld.cpp:883–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881}
882
883PhysicsBody* PhysicsWorld::getBody(int tag) const
884{
885 for (auto&& body : _bodies)
886 {
887 if (body->getTag() == tag)
888 {
889 return body;
890 }
891 }
892
893 return nullptr;
894}
895
896void PhysicsWorld::setGravity(const Vec2& gravity)
897{

Callers 7

hitTestMethod · 0.45
onTouchBeganMethod · 0.45
updateMethod · 0.45
sliceMethod · 0.45
clipPolyMethod · 0.45
onContactBeginMethod · 0.45

Calls 1

getTagMethod · 0.80

Tested by 5

onTouchBeganMethod · 0.36
updateMethod · 0.36
sliceMethod · 0.36
clipPolyMethod · 0.36
onContactBeginMethod · 0.36