SUMO - Simulation of Urban MObility
Shape.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // A 2D- or 3D-Shape
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 // ===========================================================================
34 // static member definitions
35 // ===========================================================================
36 const std::string Shape::DEFAULT_TYPE = "";
37 const double Shape::DEFAULT_LAYER = 128;
38 const double Shape::DEFAULT_ANGLE = 0;
39 const std::string Shape::DEFAULT_IMG_FILE = "";
40 const double Shape::DEFAULT_IMG_WIDTH = 1;
41 const double Shape::DEFAULT_IMG_HEIGHT = 1;
42 
43 // ===========================================================================
44 // member definitions
45 // ===========================================================================
46 Shape::Shape(const std::string& id, const std::string& type,
47  const RGBColor& color, double layer,
48  double angle, const std::string& imgFile) :
49  Named(id),
50  myType(type),
51  myColor(color),
52  myLayer(layer),
53  myNaviDegreeAngle(angle),
54  myImgFile(imgFile) {
55 }
56 
57 
59 
60 
61 /****************************************************************************/
62 
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:151
static const double DEFAULT_IMG_HEIGHT
Definition: Shape.h:153
Shape(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile)
Constructor.
Definition: Shape.cpp:46
static const std::string DEFAULT_TYPE
Definition: Shape.h:148
virtual ~Shape()
Destructor.
Definition: Shape.cpp:58
Base class for objects which have an id.
Definition: Named.h:54
static const double DEFAULT_IMG_WIDTH
Definition: Shape.h:152
static const double DEFAULT_ANGLE
Definition: Shape.h:150
static const double DEFAULT_LAYER
Definition: Shape.h:149