| 856 | } |
| 857 | |
| 858 | void 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 | |
| 878 | const Vector<PhysicsBody*>& PhysicsWorld::getAllBodies() const |
| 879 | { |