SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUITexturesHelper Class Reference

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 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 getTextureID (const std::string &filename)
 return texture id for the given filename (initialize on first use) More...
 

Static Private Attributes

static std::map< std::string, intmyTextures
 mapping from image paths to decals (initialization on first use) More...
 

Detailed Description

Global storage for textures; manages and draws them.

Definition at line 52 of file GUITexturesHelper.h.

Member Function Documentation

GUIGlID GUITexturesHelper::add ( FXImage *  i)
static

Adds a texture to use.

Definition at line 58 of file GUITexturesHelper.cpp.

Referenced by GUISUMOAbstractView::drawDecals(), and getTextureID().

void GUITexturesHelper::clearTextures ( )
static

clears loaded textures

Definition at line 117 of file GUITexturesHelper.cpp.

References myTextures.

Referenced by GUIApplicationWindow::closeAllWindows().

void GUITexturesHelper::drawTexturedBox ( unsigned int  which,
SUMOReal  size 
)
static

Draws a named texture as a box with the given size.

Definition at line 75 of file GUITexturesHelper.cpp.

Referenced by GUIPerson::drawAction_drawAsImage(), GUIVehicle::drawAction_drawVehicleAsImage(), GUISUMOAbstractView::drawDecals(), and GUIPointOfInterest::drawGL().

void GUITexturesHelper::drawTexturedBox ( unsigned int  which,
SUMOReal  sizeX1,
SUMOReal  sizeY1,
SUMOReal  sizeX2,
SUMOReal  sizeY2 
)
static

Draws a named texture as a rectangle with the given sizes.

Definition at line 81 of file GUITexturesHelper.cpp.

int GUITexturesHelper::getTextureID ( const std::string &  filename)
static

Field Documentation

std::map< std::string, int > GUITexturesHelper::myTextures
staticprivate

mapping from image paths to decals (initialization on first use)

Definition at line 73 of file GUITexturesHelper.h.

Referenced by clearTextures(), and getTextureID().


The documentation for this class was generated from the following files: