Eclipse 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.dev/sumo
3 // Copyright (C) 2012-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // A 2D- or 3D-Shape
20 /****************************************************************************/
21 #include <config.h>
23 
24 #include "Shape.h"
25 
26 // ===========================================================================
27 // static member definitions
28 // ===========================================================================
29 const std::string Shape::DEFAULT_TYPE = "";
30 const double Shape::DEFAULT_LAYER = 0;
31 const double Shape::DEFAULT_LINEWIDTH = 1;
32 const double Shape::DEFAULT_LAYER_POI = (double)GLO_POI;
33 const double Shape::DEFAULT_ANGLE = 0;
34 const std::string Shape::DEFAULT_IMG_FILE = "";
35 const bool Shape::DEFAULT_RELATIVEPATH = false;
36 const double Shape::DEFAULT_IMG_WIDTH = 1;
37 const double Shape::DEFAULT_IMG_HEIGHT = 1;
38 const std::string Shape::DEFAULT_NAME = "";
40 
41 // ===========================================================================
42 // member definitions
43 // ===========================================================================
44 Shape::Shape(const std::string& id, const std::string& type, const RGBColor& color, double layer,
45  double angle, const std::string& imgFile, const std::string& name, bool relativePath) :
46  Named(id),
47  myType(type),
48  myColor(color),
49  myLayer(layer),
50  myNaviDegreeAngle(angle),
51  myImgFile(imgFile),
52  myName(name),
53  myRelativePath(relativePath) {
54 }
55 
56 
58 
59 
60 /****************************************************************************/
@ GLO_POI
poi (over view, geo and lane)
Base class for objects which have an id.
Definition: Named.h:54
std::map< std::string, std::string > Map
parameters map
Definition: Parameterised.h:45
static const bool DEFAULT_RELATIVEPATH
Definition: Shape.h:48
static const double DEFAULT_LAYER
Definition: Shape.h:43
static const double DEFAULT_LAYER_POI
Definition: Shape.h:45
static const double DEFAULT_IMG_WIDTH
Definition: Shape.h:49
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:47
static const double DEFAULT_LINEWIDTH
Definition: Shape.h:44
static const double DEFAULT_ANGLE
Definition: Shape.h:46
virtual ~Shape()
Destructor.
Definition: Shape.cpp:57
static const std::string DEFAULT_NAME
Definition: Shape.h:51
Shape(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const std::string &name, bool relativePath)
Constructor.
Definition: Shape.cpp:44
static const double DEFAULT_IMG_HEIGHT
Definition: Shape.h:50
static const std::string DEFAULT_TYPE
Definition: Shape.h:42
static const Parameterised::Map DEFAULT_PARAMETERS
Definition: Shape.h:52