Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/utils/shapes/Shape.cpp
169678 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2012-2025 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
/****************************************************************************/
14
/// @file Shape.cpp
15
/// @author Jakob Erdmann
16
/// @author Michael Behrisch
17
/// @date Oct 2012
18
///
19
// A 2D- or 3D-Shape
20
/****************************************************************************/
21
#include <config.h>
22
#include <utils/gui/globjects/GUIGlObjectTypes.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 double Shape::DEFAULT_IMG_WIDTH = 2.6;
36
const double Shape::DEFAULT_IMG_HEIGHT = 1;
37
const std::string Shape::DEFAULT_NAME = "";
38
const Parameterised::Map Shape::DEFAULT_PARAMETERS = Parameterised::Map();
39
40
// ===========================================================================
41
// member definitions
42
// ===========================================================================
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) :
46
Named(id),
47
myType(type),
48
myColor(color),
49
myLayer(layer),
50
myNaviDegreeAngle(angle),
51
myImgFile(imgFile),
52
myName(name) {
53
}
54
55
56
Shape::~Shape() {}
57
58
59
/****************************************************************************/
60
61