00001
00010 #ifndef DEBUGDRAW_H
00011 #define DEBUGDRAW_H
00012
00013 #include "IS3DCommon.H"
00014 #include "TextScreen.H"
00015
00016 namespace IS3D {
00017
00018 typedef ReferenceCountedPointer<class DebugDraw> DebugDrawRef;
00021 class DebugDraw : public DrawObj
00022 {
00023 public:
00024 DebugDraw();
00025 virtual ~DebugDraw();
00026
00027 void printf(const char* fmt, ...);
00028 void print(const std::string &msg);
00029 void println(const std::string &msg);
00030 void println();
00031 void clear();
00032
00033 void watchVector(const std::string &name,
00034 Vector3 *posDataPtr,
00035 Vector3 *dirDataPtr,
00036 bool dataIsInRoomCoords=false,
00037 Color4 color = Color3::orange());
00038
00039
00040 void watchPoint(const std::string &name,
00041 Vector3 *posDataPtr,
00042 bool dataIsInRoomCoords=false,
00043 Color4 color = Color3::red());
00044
00045
00046 void draw();
00047
00048 private:
00049
00050 TextScreenRef _textScreen;
00051
00052 Array<std::string> _vecName;
00053 Array<Vector3*> _vecPos;
00054 Array<Vector3*> _vecDir;
00055 Array<bool> _vecIsRoom;
00056 Array<Color4> _vecColor;
00057
00058 Array<std::string> _pointName;
00059 Array<Vector3*> _pointPos;
00060 Array<bool> _pointIsRoom;
00061 Array<Color4> _pointColor;
00062 };
00063
00064 }
00065
00066 #endif