SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Shape.cpp
Go to the documentation of this file.
1 /****************************************************************************/
7 // A 2D- or 3D-Shape
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 
31 #include "Shape.h"
32 
33 #ifdef CHECK_MEMORY_LEAKS
34 #include <foreign/nvwa/debug_new.h>
35 #endif // CHECK_MEMORY_LEAKS
36 
37 // ===========================================================================
38 // static member definitions
39 // ===========================================================================
40 const std::string Shape::DEFAULT_TYPE = "";
41 const SUMOReal Shape::DEFAULT_LAYER = 128;
43 const std::string Shape::DEFAULT_IMG_FILE = "";
46 
47 // ===========================================================================
48 // member definitions
49 // ===========================================================================
50 Shape::Shape(const std::string& id, const std::string& type,
51  const RGBColor& color, SUMOReal layer,
52  SUMOReal angle, const std::string& imgFile) :
53  Named(id),
54  myType(type),
55  myColor(color),
56  myLayer(layer),
57  myAngle(angle),
58  myImgFile(imgFile)
59 {}
60 
61 
63 
64 
65 /****************************************************************************/
66 
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:151
static const std::string DEFAULT_TYPE
Definition: Shape.h:148
static const SUMOReal DEFAULT_ANGLE
Definition: Shape.h:150
static const SUMOReal DEFAULT_IMG_HEIGHT
Definition: Shape.h:153
virtual ~Shape()
Destructor.
Definition: Shape.cpp:62
Shape(const std::string &id, const std::string &type, const RGBColor &color, SUMOReal layer, SUMOReal angle, const std::string &imgFile)
Constructor.
Definition: Shape.cpp:50
Base class for objects which have an id.
Definition: Named.h:45
static const SUMOReal DEFAULT_LAYER
Definition: Shape.h:149
#define SUMOReal
Definition: config.h:215
static const SUMOReal DEFAULT_IMG_WIDTH
Definition: Shape.h:152