00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _OgreBulletCollisions_DebugDrawer_H_
00031 #define _OgreBulletCollisions_DebugDrawer_H_
00032
00033 #include "OgreBulletCollisionsPreRequisites.h"
00034
00035 #include "Debug/OgreBulletCollisionsDebugLines.h"
00036
00037 namespace OgreBulletCollisions
00038 {
00039
00040 class DebugDrawer : public DebugLines, public btIDebugDraw
00041 {
00042 public:
00043 DebugDrawer();
00044 virtual ~DebugDrawer();
00045
00046
00047 virtual void setDebugMode(int mode){mDebugMode = mode;};
00048 virtual int getDebugMode() const { return mDebugMode;};
00049
00050 virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
00051 virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,
00052 btScalar distance,int lifeTime,const btVector3& color);
00053
00054 void drawAabb(const Ogre::Vector3& from,const Ogre::Vector3& to,const Ogre::Vector3& color);
00055 void drawLine(const Ogre::Vector3& from,const Ogre::Vector3& to,const Ogre::Vector3& color);
00056 void drawContactPoint(const Ogre::Vector3& PointOnB,const Ogre::Vector3& normalOnB,
00057 Ogre::Real distance,int lifeTime,const Ogre::Vector3& color);
00058
00059 void setDrawAabb(bool enable);
00060 void setDrawWireframe(bool enable);
00061 void setDrawFeaturesText(bool enable);
00062 void setDrawContactPoints(bool enable);
00063 void setNoDeactivation(bool enable);
00064 void setNoHelpText(bool enable);
00065 void setDrawText(bool enable);
00066 void setProfileTimings(bool enable);
00067 void setEnableSatComparison(bool enable);
00068 void setDisableBulletLCP (bool enable);
00069 void setEnableCCD(bool enable);
00070
00071 bool doesDrawAabb () const;
00072 bool doesDrawWireframe () const;
00073 bool doesDrawFeaturesText () const;
00074 bool doesDrawContactPoints () const;
00075 bool doesNoDeactivation () const;
00076 bool doesNoHelpText () const;
00077 bool doesDrawText () const;
00078 bool doesProfileTimings () const;
00079 bool doesEnableSatComparison () const;
00080 bool doesDisableBulletLCP () const;
00081 bool doesEnableCCD () const;
00082
00083 void drawAabb(const btVector3& from,const btVector3& to,const btVector3& color);
00084
00085
00086 void draw3dText(const btVector3& location,const char* textString);
00087
00088 void reportErrorWarning(const char* warningString);
00089 protected:
00090 int mDebugMode;
00091 };
00092 }
00093
00094 #endif //_OgreBulletCollisions_DebugDrawer_H_
00095