VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
LiquidFunDebugDraw.h
1 /*
2  * Copyright (C) 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LIQUIDFUNDEBUGDRAW_H
18 #define LIQUIDFUNDEBUGDRAW_H
19 
20 #include <Box2D/Box2D.h>
21 
35 class LiquidFunDebugDraw : public b2Draw {
36 public:
41  virtual ~LiquidFunDebugDraw();
42 
49  virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount,
50  const b2Color& color) override;
58  virtual void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount,
59  const b2Color& color) override;
66  virtual void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color) override;
74  virtual void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis,
75  const b2Color& color) override;
83  virtual void DrawParticles(const b2Vec2* centers, float32 radius,
84  const b2ParticleColor* colors, int32 count) override;
91  virtual void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) override;
99  virtual void DrawTransform(const b2Transform& xf) override;
100 
101 private:
102  static const int CIRCLE_SEGMENTS = 16;
103  static const int PARTICLE_CIRCLE_SEGMENTS = 8;
104 };
105 
106 #endif // LIQUIDFUNDEBUGDRAW_H
Implementation of b2Draw which renders objects (body fixtures, particles, etc.) using DebugRenderer...
Definition: LiquidFunDebugDraw.h:35
virtual void DrawParticles(const b2Vec2 *centers, float32 radius, const b2ParticleColor *colors, int32 count) override
Draw a list of particles as circles.
virtual void DrawPolygon(const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override
Draw a closed polygon line.
virtual void DrawCircle(const b2Vec2 &center, float32 radius, const b2Color &color) override
Draw a circle.
virtual void DrawSegment(const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color) override
Draw a line segment.
virtual void DrawSolidCircle(const b2Vec2 &center, float32 radius, const b2Vec2 &axis, const b2Color &color) override
Draw a filled circle.
virtual void DrawTransform(const b2Transform &xf) override
Draw a two dimensional transform.
virtual void DrawSolidPolygon(const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override
Draw a filled polygon.
LiquidFunDebugDraw()
Constructs a LiquidFunDebugDraw.