GLHelper.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GLHelper_h
00020 #define GLHelper_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <vector>
00033 #include <utility>
00034 #include <utils/geom/Position2DVector.h>
00035 #include <utils/geom/Line2D.h>
00036
00037
00038
00039
00040
00047 class GLHelper {
00048 public:
00054 static void drawFilledPoly(const Position2DVector &v, bool close) throw();
00055
00056
00066 static void drawBoxLine(const Position2D &beg, SUMOReal rot,
00067 SUMOReal visLength, SUMOReal width) throw();
00068
00069
00080 static void drawBoxLine(const Position2D &beg1, const Position2D &beg2,
00081 SUMOReal rot, SUMOReal visLength, SUMOReal width) throw();
00082
00083
00094 static void drawBoxLines(const Position2DVector &geom,
00095 const std::vector<SUMOReal> &rots, const std::vector<SUMOReal> &lengths,
00096 SUMOReal width) throw();
00097
00098
00110 static void drawBoxLines(const Position2DVector &geom1,
00111 const Position2DVector &geom2,
00112 const std::vector<SUMOReal> &rots, const std::vector<SUMOReal> &lengths,
00113 SUMOReal width) throw();
00114
00115
00125 static void drawBoxLines(const Position2DVector &geom, SUMOReal width) throw();
00126
00127
00136 static void drawLine(const Position2D &beg, SUMOReal rot,
00137 SUMOReal visLength) throw();
00138
00139
00149 static void drawLine(const Position2D &beg1, const Position2D &beg2,
00150 SUMOReal rot, SUMOReal visLength) throw();
00151
00152
00159 static void drawLine(const Position2DVector &v) throw();
00160
00161
00169 static void drawLine(const Position2D &beg, const Position2D &end) throw();
00170
00171
00179 static void drawFilledCircle(SUMOReal width, int steps=8) throw();
00180
00181
00191 static void drawFilledCircle(SUMOReal width, int steps,
00192 SUMOReal beg, SUMOReal end) throw();
00193
00194
00203 static void drawOutlineCircle(SUMOReal width, SUMOReal iwidth,
00204 int steps=8) throw();
00205
00206
00217 static void drawOutlineCircle(SUMOReal width, SUMOReal iwidth,
00218 int steps, SUMOReal beg, SUMOReal end) throw();
00219
00220
00227 static void drawTriangleAtEnd(const Line2D &l, SUMOReal tLength,
00228 SUMOReal tWidth) throw();
00229
00230 private:
00232 static std::vector<std::pair<SUMOReal, SUMOReal> > myCircleCoords;
00233
00234 };
00235
00236
00237 #endif
00238
00239
00240