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