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 const double maxDim =
MAX2(length, width);
58 const int steps =
MIN2(
MAX2(8,
int(detail / 10)), 64);
59 glScaled(maxDim, maxDim, 1);
67 glRotated(
RAD2DEG(angle), 0, 0, 1);
68 glScaled(length, width, 1);
70 glTranslated(0, 0, .045);
72 glTranslated(-0.5, 0, 0);
77 glBegin(GL_TRIANGLES);
78 glVertex2d(0.0, -0.2);
82 glTranslated(0, 0, -.045);
84 glScaled(0.9, 2.0, 1);
85 glTranslated(0, 0, .04);
88 glTranslated(0, 0, -.04);
102 const double halfLength = length / 2.0 * exaggeration;
103 const double halfWidth = width / 2.0 * exaggeration;
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
@ PEDESTRIAN
render as a pedestrian
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawFilledCircle(double width, 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_drawAsCircle(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.