| 29 | DebugDraw::~DebugDraw() { } |
| 30 | |
| 31 | bool DebugDraw::IsVisible(Body* body) { |
| 32 | if (!body) return true; |
| 33 | Node* owner = s_cast<Node*>(body->getOwner()); |
| 34 | return body->isVisible() && (owner == nullptr || (owner->isVisible() && (owner->getParent() == nullptr || owner->getParent()->isVisible()))); |
| 35 | } |
| 36 | |
| 37 | void DebugDraw::DrawPolygon(const pr::Length2* oldVertices, int vertexCount, const Color& color) { |
| 38 | std::vector<Vec2> vertices(vertexCount + 1); |