| 262 | } |
| 263 | |
| 264 | static void DrawPolygon(int count, |
| 265 | const cpVect* verts, |
| 266 | cpFloat /*r*/, |
| 267 | cpSpaceDebugColor outline, |
| 268 | cpSpaceDebugColor fill, |
| 269 | cpDataPointer data) |
| 270 | { |
| 271 | const Color4F fillColor(fill.r, fill.g, fill.b, fill.a); |
| 272 | const Color4F outlineColor(outline.r, outline.g, outline.b, outline.a); |
| 273 | DrawNode* drawNode = static_cast<DrawNode*>(data); |
| 274 | int num = count; |
| 275 | Vec2* seg = new Vec2[num]; |
| 276 | for (int i = 0; i < num; ++i) |
| 277 | seg[i] = PhysicsHelper::cpv2vec2(verts[i]); |
| 278 | |
| 279 | drawNode->drawPolygon(seg, num, fillColor, _debugDrawThickness, outlineColor); |
| 280 | |
| 281 | delete[] seg; |
| 282 | } |
| 283 | |
| 284 | static void DrawDot(cpFloat /*size*/, cpVect pos, cpSpaceDebugColor color, cpDataPointer data) |
| 285 | { |
nothing calls this directly
no test coverage detected