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.org/sumo
3 // Copyright (C) 2012-2020 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 = 128;
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 
39 // ===========================================================================
40 // member definitions
41 // ===========================================================================
42 Shape::Shape(const std::string& id, const std::string& type,
43  const RGBColor& color, double layer,
44  double angle, const std::string& imgFile, bool relativePath) :
45  Named(id),
46  myType(type),
47  myColor(color),
48  myLayer(layer),
49  myNaviDegreeAngle(angle),
50  myImgFile(imgFile),
51  myRelativePath(relativePath) {
52 }
53 
54 
56 
57 
58 /****************************************************************************/
@ GLO_POI
a poi
Base class for objects which have an id.
Definition: Named.h:53
static const bool DEFAULT_RELATIVEPATH
Definition: Shape.h:46
static const double DEFAULT_LAYER
Definition: Shape.h:41
static const double DEFAULT_LAYER_POI
Definition: Shape.h:43
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:42
static const double DEFAULT_IMG_WIDTH
Definition: Shape.h:47
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:45
static const double DEFAULT_LINEWIDTH
Definition: Shape.h:42
static const double DEFAULT_ANGLE
Definition: Shape.h:44
virtual ~Shape()
Destructor.
Definition: Shape.cpp:55
static const double DEFAULT_IMG_HEIGHT
Definition: Shape.h:48
static const std::string DEFAULT_TYPE
Definition: Shape.h:40