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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // A 2D- or 3D-Shape
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
25 
26 #include "Shape.h"
27 
28 // ===========================================================================
29 // static member definitions
30 // ===========================================================================
31 const std::string Shape::DEFAULT_TYPE = "";
32 const double Shape::DEFAULT_LAYER = 128;
33 const double Shape::DEFAULT_LINEWIDTH = 1;
34 const double Shape::DEFAULT_LAYER_POI = (double)GLO_POI;
35 const double Shape::DEFAULT_ANGLE = 0;
36 const std::string Shape::DEFAULT_IMG_FILE = "";
37 const bool Shape::DEFAULT_RELATIVEPATH = false;
38 const double Shape::DEFAULT_IMG_WIDTH = 1;
39 const double Shape::DEFAULT_IMG_HEIGHT = 1;
40 
41 // ===========================================================================
42 // member definitions
43 // ===========================================================================
44 Shape::Shape(const std::string& id, const std::string& type,
45  const RGBColor& color, double layer,
46  double angle, const std::string& imgFile, bool relativePath) :
47  Named(id),
48  myType(type),
49  myColor(color),
50  myLayer(layer),
51  myNaviDegreeAngle(angle),
52  myImgFile(imgFile),
53  myRelativePath(relativePath) {
54 }
55 
56 
58 
59 
60 /****************************************************************************/
61 
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:48
static const double DEFAULT_LAYER_POI
Definition: Shape.h:46
static const double DEFAULT_IMG_HEIGHT
Definition: Shape.h:51
static const std::string DEFAULT_TYPE
Definition: Shape.h:43
virtual ~Shape()
Destructor.
Definition: Shape.cpp:57
static const bool DEFAULT_RELATIVEPATH
Definition: Shape.h:49
static const double DEFAULT_LINEWIDTH
Definition: Shape.h:45
Shape(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath)
Constructor.
Definition: Shape.cpp:44
Base class for objects which have an id.
Definition: Named.h:58
static const double DEFAULT_IMG_WIDTH
Definition: Shape.h:50
static const double DEFAULT_ANGLE
Definition: Shape.h:47
static const double DEFAULT_LAYER
Definition: Shape.h:44