Overte C++ Documentation
PhysicsDebugDraw.h
1 //
2 // PhysicsDebugDraw.h
3 // libraries/physics/src
4 //
5 // Created by Anthony Thibault 2018-4-18
6 // Copyright 2018 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 // http://bulletphysics.org/Bullet/BulletFull/classbtIDebugDraw.html
12 
13 #ifndef hifi_PhysicsDebugDraw_h
14 #define hifi_PhysicsDebugDraw_h
15 
16 #include <stdint.h>
17 #include <LinearMath/btIDebugDraw.h>
18 
19 class PhysicsDebugDraw : public btIDebugDraw {
20 public:
21  using btIDebugDraw::drawLine;
22  virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& color) override;
23  virtual void drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB, btScalar distance,
24  int lifeTime, const btVector3& color) override;
25  virtual void reportErrorWarning(const char* warningString) override;
26  virtual void draw3dText(const btVector3& location, const char* textString) override;
27  virtual void setDebugMode(int debugMode) override;
28  virtual int getDebugMode() const override;
29 
30 protected:
31  uint32_t _debugDrawMode;
32 };
33 
34 #endif // hifi_PhysicsDebugDraw_h