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-2019 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
>
24
#include <
utils/gui/globjects/GUIGlObjectTypes.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
57
Shape::~Shape
() {}
58
59
60
/****************************************************************************/
61
GUIGlObjectTypes.h
Named
Base class for objects which have an id.
Definition:
Named.h:57
Shape::DEFAULT_LAYER
static const double DEFAULT_LAYER
Definition:
Shape.h:44
Shape::DEFAULT_IMG_HEIGHT
static const double DEFAULT_IMG_HEIGHT
Definition:
Shape.h:51
Shape::~Shape
virtual ~Shape()
Destructor.
Definition:
Shape.cpp:57
Shape::DEFAULT_RELATIVEPATH
static const bool DEFAULT_RELATIVEPATH
Definition:
Shape.h:49
RGBColor
Definition:
RGBColor.h:40
Shape.h
Shape::DEFAULT_LINEWIDTH
static const double DEFAULT_LINEWIDTH
Definition:
Shape.h:45
Shape::DEFAULT_TYPE
static const std::string DEFAULT_TYPE
Definition:
Shape.h:43
GLO_POI
a poi
Definition:
GUIGlObjectTypes.h:107
Shape::DEFAULT_ANGLE
static const double DEFAULT_ANGLE
Definition:
Shape.h:47
Shape::Shape
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
config.h
Shape::DEFAULT_IMG_FILE
static const std::string DEFAULT_IMG_FILE
Definition:
Shape.h:48
Shape::DEFAULT_LAYER_POI
static const double DEFAULT_LAYER_POI
Definition:
Shape.h:46
Shape::DEFAULT_IMG_WIDTH
static const double DEFAULT_IMG_WIDTH
Definition:
Shape.h:50
src
utils
shapes
Shape.cpp
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16