![]() |
SUMO - Simulation of Urban MObility
|
Global storage for textures; manages and draws them. More...
#include <GUITexturesHelper.h>
Static Public Member Functions | |
static GUIGlID | add (FXImage *i) |
Adds a texture to use. More... | |
static void | allowTextures (const bool val) |
switch texture drawing on and off More... | |
static void | clearTextures () |
clears loaded textures More... | |
static void | drawTexturedBox (unsigned int which, SUMOReal size) |
Draws a named texture as a box with the given size. More... | |
static void | drawTexturedBox (unsigned int which, SUMOReal sizeX1, SUMOReal sizeY1, SUMOReal sizeX2, SUMOReal sizeY2) |
Draws a named texture as a rectangle with the given sizes. More... | |
static int | getMaxTextureSize () |
return maximum number of pixels in x and y direction More... | |
static int | getTextureID (const std::string &filename, const bool mirrorX=false) |
return texture id for the given filename (initialize on first use) More... | |
static bool | texturesAllowed () |
ask whether texture drawing is enabled More... | |
Static Private Attributes | |
static bool | myAllowTextures = true |
whether textures are drawn More... | |
static std::map< std::string, int > | myTextures |
mapping from image paths to decals (initialization on first use) More... | |
Global storage for textures; manages and draws them.
Definition at line 46 of file GUITexturesHelper.h.
|
static |
Adds a texture to use.
Definition at line 67 of file GUITexturesHelper.cpp.
Referenced by GUISUMOAbstractView::drawDecals(), GNEJunction::drawGL(), and getTextureID().
|
inlinestatic |
switch texture drawing on and off
Definition at line 69 of file GUITexturesHelper.h.
References myAllowTextures.
Referenced by main(), GUIDialog_AppSettings::onCmdOk(), and GUILoadThread::run().
|
static |
clears loaded textures
Definition at line 148 of file GUITexturesHelper.cpp.
References myTextures.
Referenced by GUIApplicationWindow::closeAllWindows().
|
static |
Draws a named texture as a box with the given size.
Definition at line 84 of file GUITexturesHelper.cpp.
Referenced by GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIBaseVehicle::drawAction_drawVehicleAsImage(), GUISUMOAbstractView::drawDecals(), GUIPointOfInterest::drawGL(), and GNEJunction::drawGL().
|
static |
Draws a named texture as a rectangle with the given sizes.
Definition at line 90 of file GUITexturesHelper.cpp.
References myAllowTextures.
|
static |
return maximum number of pixels in x and y direction
Definition at line 59 of file GUITexturesHelper.cpp.
References max.
Referenced by GUISUMOAbstractView::drawDecals(), and getTextureID().
|
static |
return texture id for the given filename (initialize on first use)
Definition at line 125 of file GUITexturesHelper.cpp.
References add(), GUIMainWindow::getInstance(), getMaxTextureSize(), MFXImageHelper::loadImage(), myTextures, MFXImageHelper::scalePower2(), WRITE_ERROR, and WRITE_WARNING.
Referenced by GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIBaseVehicle::drawAction_drawVehicleAsImage(), GUIPolygon::drawGL(), and GUIPointOfInterest::drawGL().
|
inlinestatic |
ask whether texture drawing is enabled
Definition at line 74 of file GUITexturesHelper.h.
References myAllowTextures.
|
staticprivate |
whether textures are drawn
Definition at line 83 of file GUITexturesHelper.h.
Referenced by allowTextures(), drawTexturedBox(), and texturesAllowed().
|
staticprivate |
mapping from image paths to decals (initialization on first use)
Definition at line 80 of file GUITexturesHelper.h.
Referenced by clearTextures(), and getTextureID().