Files
bullet3/Demos3/bullet2/BasicDemo/MyDebugDrawer.h
Erwin Coumans 71f0537c6e add Bullet 2.x constraint solver tests for hinge, with large mass ratio
experiment with Midi controls in PairBenchmark to tune variables (will move it into a utility class, so every demo can easier use it in the future)
fix issue with broadphase, not initializing all pairs properly at pair array overflow
2014-01-28 10:25:04 -08:00

49 lines
950 B
C++

#ifndef MY_DEBUG_DRAWER_H
#define MY_DEBUG_DRAWER_H
#include "LinearMath/btIDebugDraw.h"
class MyDebugDrawer : public btIDebugDraw
{
SimpleOpenGL3App* m_glApp;
int m_debugMode;
public:
MyDebugDrawer(SimpleOpenGL3App* app)
: m_glApp(app)
,m_debugMode(btIDebugDraw::DBG_DrawWireframe|btIDebugDraw::DBG_DrawAabb)
{
}
virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color)
{
m_glApp->m_instancingRenderer->drawLine(from,to,color);
}
virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color)
{
}
virtual void reportErrorWarning(const char* warningString)
{
}
virtual void draw3dText(const btVector3& location,const char* textString)
{
}
virtual void setDebugMode(int debugMode)
{
m_debugMode = debugMode;
}
virtual int getDebugMode() const
{
return m_debugMode;
}
};
#endif //MY_DEBUG_DRAWER_H