diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-17 17:19:03 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-17 17:19:03 +0000 |
commit | d6e4c4e7c2b1e28961f1dfe2f25ef96ced60b21b (patch) | |
tree | 63744dff093a8b23f65d9c68b922b678805647d9 /src/render/debugdrawer.h | |
parent | ea6e6bb769d713ac55114c1940626f13e384ebed (diff) |
core bullet physics support,
initial vstrafe support
Diffstat (limited to 'src/render/debugdrawer.h')
-rw-r--r-- | src/render/debugdrawer.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/render/debugdrawer.h b/src/render/debugdrawer.h new file mode 100644 index 0000000..a23cecc --- /dev/null +++ b/src/render/debugdrawer.h @@ -0,0 +1,54 @@ +/* + render/debugdrawer.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_RENDER_DEBUGDRAWER_H__ +#define __INCLUDED_RENDER_DEBUGDRAWER_H__ + +#include "LinearMath/btIDebugDraw.h" + +namespace render { + +/** + * @brief implementation for the bullet debug draw interface + * This class implements the bullet btIDebugDraw interface to + * render the world as seen by the bullet physics library + */ +class DebugDrawer: public btIDebugDraw +{ +public: + DebugDrawer(); + virtual ~DebugDrawer(); + + virtual void drawLine(const btVector3 & from, const btVector3 & to, const btVector3 & color); + + virtual void drawLine(const btVector3& from, const btVector3 & to, const btVector3 & fromColor, const btVector3 & toColor); + + virtual void drawContactPoint(const btVector3 & point, const btVector3 & normal, btScalar distance, int lifetime, const btVector3 & color); + + virtual void drawSphere(btScalar radius, const btTransform & transform, const btVector3 & color); + + virtual void drawSphere(const btVector3 & p, btScalar radius, const btVector3 & color); + + virtual void drawBox(const btVector3 & bbMin, const btVector3 & bbMax, const btVector3 & color); + + virtual void drawBox(const btVector3 & bbMin, const btVector3 & bbMax, const btTransform & trans, const btVector3 & color); + + virtual void reportErrorWarning(const char *warningString); + + virtual void draw3dText(const btVector3 &location, const char *textString); + + virtual void setDebugMode(int debugMode); + + virtual int getDebugMode() const; + +private: + int debugdrawer_debugmode; +}; + +extern DebugDrawer bullet_debugdrawer; +} // namespace render + +#endif // __INCLUDED_RENDER_DEBUGDRAWER_H__ |