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

Method setDebugDrawMask

core/physics/PhysicsWorld.cpp:858–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858void PhysicsWorld::setDebugDrawMask(int mask)
859{
860 if (mask == DEBUGDRAW_NONE)
861 {
862 if (_debugDraw)
863 {
864 _debugDraw->removeFromParent();
865 AX_SAFE_RELEASE_NULL(_debugDraw);
866 }
867 }
868 else if (!_debugDraw)
869 {
870 _debugDraw = DrawNode::create();
871 _debugDraw->setIsolated(true);
872 _debugDraw->retain();
873 }
874
875 _debugDrawMask = mask;
876}
877
878const Vector<PhysicsBody*>& PhysicsWorld::getAllBodies() const
879{

Callers 2

toggleDebugMethod · 0.80

Calls 3

createFunction · 0.85
removeFromParentMethod · 0.45
retainMethod · 0.45

Tested by 1

toggleDebugMethod · 0.64