Guest User

DebugDraw.h

a guest
Apr 25th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.80 KB | None | 0 0
  1. /*
  2. * Copyright (c) 2006-2007 Erin Catto http://www.box2d.org
  3. *
  4. * This software is provided 'as-is', without any express or implied
  5. * warranty.  In no event will the authors be held liable for any damages
  6. * arising from the use of this software.
  7. * Permission is granted to anyone to use this software for any purpose,
  8. * including commercial applications, and to alter it and redistribute it
  9. * freely, subject to the following restrictions:
  10. * 1. The origin of this software must not be misrepresented; you must not
  11. * claim that you wrote the original software. If you use this software
  12. * in a product, an acknowledgment in the product documentation would be
  13. * appreciated but is not required.
  14. * 2. Altered source versions must be plainly marked as such, and must not be
  15. * misrepresented as being the original software.
  16. * 3. This notice may not be removed or altered from any source distribution.
  17. */
  18.  
  19. #ifndef RENDER_H
  20. #define RENDER_H
  21.  
  22. #include <Box2D/Box2D.h>
  23.  
  24. struct b2AABB;
  25.  
  26. // This class implements debug drawing callbacks that are invoked
  27. // inside b2World::Step.
  28. class DebugDraw : public b2Draw
  29. {
  30. public:
  31.     void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
  32.  
  33.     void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
  34.  
  35.     void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color);
  36.  
  37.     void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color);
  38.  
  39.     void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color);
  40.  
  41.     void DrawTransform(const b2Transform& xf);
  42.  
  43.     void DrawPoint(const b2Vec2& p, float32 size, const b2Color& color);
  44.  
  45.     void DrawString(int x, int y, const char* string, ...);
  46.  
  47.     void DrawAABB(b2AABB* aabb, const b2Color& color);
  48. };
  49.  
  50.  
  51. #endif
Advertisement
Add Comment
Please, Sign In to add comment