36 glRotated(
RAD2DEG(angle), 0, 0, 1);
37 glScaled(length, width, 1);
38 glBegin(GL_TRIANGLES);
45 glTranslated(0, 0, .045);
46 glBegin(GL_TRIANGLES);
48 glVertex2d(-0.5, -0.25);
49 glVertex2d(-0.5, 0.25);
51 glTranslated(0, 0, -.045);
57 glRotated(
RAD2DEG(angle), 0, 0, 1);
58 const double maxDim =
MAX2(length, width);
59 const int steps =
MIN2(
MAX2(8,
int(detail / 10)), 64);
60 glScaled(maxDim, maxDim, 1);
61 glTranslated(-0.8, 0, 0);
68 const double maxDim =
MAX2(length, width);
69 const int steps =
MIN2(
MAX2(8,
int(detail / 10)), 64);
70 glScaled(maxDim, maxDim, 1);
78 glRotated(
RAD2DEG(angle), 0, 0, 1);
79 glScaled(length, width, 1);
81 glTranslated(0, 0, .045);
83 glTranslated(-0.5, 0, 0);
88 glBegin(GL_TRIANGLES);
89 glVertex2d(0.0, -0.2);
93 glTranslated(0, 0, -.045);
95 glScaled(0.9, 2.0, 1);
96 glTranslated(0, 0, .04);
99 glTranslated(0, 0, -.04);
113 const double halfLength = length / 2.0 * exaggeration;
114 const double halfWidth = width / 2.0 * exaggeration;
SUMOVehicleShape
Definition of vehicle classes to differ between different appearances.
@ PEDESTRIAN
render as a pedestrian
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawFilledCircle(const double widradiusth, const int steps=8)
Draws a filled circle around (0,0)
static RGBColor getColor()
gets the gl-color
static void drawAction_drawAsPoly(const double angle, const double length, const double width)
static void drawAction_drawAsImage(const double angle, const double length, const double width, const std::string &file, const SUMOVehicleShape guiShape, const double exaggeration)
static void drawAction_drawAsCenteredCircle(const double length, const double width, double detail)
static void drawAction_drawAsCircle(const double angle, const double length, const double width, double detail)
static void drawAction_drawAsTriangle(const double angle, const double length, const double width)
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.