LkEngine 0.1.2
 
Loading...
Searching...
No Matches
Box2DDebugger.h
1#pragma once
2
3#if 0 /* Disabled for now. */
4#include <box2d/b2_draw.h>
5
6namespace LkEngine {
7
8 class Box2DDebugger : public Debugger2D, public b2Draw
9 {
10 public:
11 Box2DDebugger();
12 ~Box2DDebugger() = default;
13
14 // b2Draw functions
15 void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) override;
16 void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) override;
17 void DrawCircle(const b2Vec2& center, float radius, const b2Color& color) override;
18 void DrawSolidCircle(const b2Vec2& center, float radius, const b2Vec2& axis, const b2Color& color);
19 void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) override;
20 void DrawTransform(const b2Transform& xf) override;
21 void DrawPoint(const b2Vec2& p, float size, const b2Color& color) override;
22 };
23
24 namespace Utils {
25
26 static std::vector<glm::vec2> ConvertB2VecToGlmVec2(const b2Vec2* vertices, int32 vertexCount)
27 {
28 std::vector<glm::vec2> glmVertices;
29 glmVertices.reserve(vertexCount);
30 for (int i = 0; i < vertexCount; i++)
31 glmVertices.push_back(glm::vec2(vertices[i].x, vertices[i].y));
32 return glmVertices;
33 }
34
35 }
36}
37
38#endif
Definition Asset.h:11