| 491 | } |
| 492 | |
| 493 | void Test::DrawAABB(b2AABB* aabb, const b2Color& color) |
| 494 | { |
| 495 | b2Vec2 p1 = aabb->lowerBound; |
| 496 | b2Vec2 p2 = b2Vec2(aabb->upperBound.x, aabb->lowerBound.y); |
| 497 | b2Vec2 p3 = aabb->upperBound; |
| 498 | b2Vec2 p4 = b2Vec2(aabb->lowerBound.x, aabb->upperBound.y); |
| 499 | |
| 500 | Vec2 verts[] = { |
| 501 | Vec2(p1.x * g_debugDraw.mRatio, p1.y * g_debugDraw.mRatio) + g_debugDraw.debugNodeOffset, |
| 502 | Vec2(p2.x * g_debugDraw.mRatio, p2.y * g_debugDraw.mRatio) + g_debugDraw.debugNodeOffset, |
| 503 | Vec2(p3.x * g_debugDraw.mRatio, p3.y * g_debugDraw.mRatio) + g_debugDraw.debugNodeOffset, |
| 504 | Vec2(p4.x * g_debugDraw.mRatio, p4.y * g_debugDraw.mRatio) + g_debugDraw.debugNodeOffset, |
| 505 | }; |
| 506 | debugDrawNode->drawPolygon(verts, sizeof(verts) / sizeof(verts[0]), |
| 507 | Color4F(color.r / 2, color.g / 2, color.b / 2, 0), 0.4f, |
| 508 | Color4F(color.r, color.g, color.b, color.a)); |
| 509 | } |
| 510 | |
| 511 | void Test::Flush() |
| 512 | { |
nothing calls this directly
no test coverage detected