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
/****************************************************************************/
15
// A 2D- or 3D-Shape
16
/****************************************************************************/
17
18
19
// ===========================================================================
20
// included modules
21
// ===========================================================================
22
#include <
config.h
>
23
#include <
utils/gui/globjects/GUIGlObjectTypes.h
>
24
25
#include "
Shape.h
"
26
27
// ===========================================================================
28
// static member definitions
29
// ===========================================================================
30
const
std::string
Shape::DEFAULT_TYPE
=
""
;
31
const
double
Shape::DEFAULT_LAYER
= 128;
32
const
double
Shape::DEFAULT_LINEWIDTH
= 1;
33
const
double
Shape::DEFAULT_LAYER_POI
= (double)
GLO_POI
;
34
const
double
Shape::DEFAULT_ANGLE
= 0;
35
const
std::string
Shape::DEFAULT_IMG_FILE
=
""
;
36
const
bool
Shape::DEFAULT_RELATIVEPATH
=
false
;
37
const
double
Shape::DEFAULT_IMG_WIDTH
= 1;
38
const
double
Shape::DEFAULT_IMG_HEIGHT
= 1;
39
40
// ===========================================================================
41
// member definitions
42
// ===========================================================================
43
Shape::Shape
(
const
std::string&
id
,
const
std::string& type,
44
const
RGBColor
& color,
double
layer,
45
double
angle,
const
std::string& imgFile,
bool
relativePath) :
46
Named
(id),
47
myType(type),
48
myColor(color),
49
myLayer(layer),
50
myNaviDegreeAngle(angle),
51
myImgFile(imgFile),
52
myRelativePath(relativePath) {
53
}
54
55
56
Shape::~Shape
() {}
57
58
59
/****************************************************************************/
60
GUIGlObjectTypes.h
Named
Base class for objects which have an id.
Definition:
Named.h:56
Shape::DEFAULT_LAYER
static const double DEFAULT_LAYER
Definition:
Shape.h:43
Shape::DEFAULT_IMG_HEIGHT
static const double DEFAULT_IMG_HEIGHT
Definition:
Shape.h:50
Shape::~Shape
virtual ~Shape()
Destructor.
Definition:
Shape.cpp:56
Shape::DEFAULT_RELATIVEPATH
static const bool DEFAULT_RELATIVEPATH
Definition:
Shape.h:48
RGBColor
Definition:
RGBColor.h:39
Shape.h
Shape::DEFAULT_LINEWIDTH
static const double DEFAULT_LINEWIDTH
Definition:
Shape.h:44
Shape::DEFAULT_TYPE
static const std::string DEFAULT_TYPE
Definition:
Shape.h:42
GLO_POI
a poi
Definition:
GUIGlObjectTypes.h:106
Shape::DEFAULT_ANGLE
static const double DEFAULT_ANGLE
Definition:
Shape.h:46
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:43
config.h
Shape::DEFAULT_IMG_FILE
static const std::string DEFAULT_IMG_FILE
Definition:
Shape.h:47
Shape::DEFAULT_LAYER_POI
static const double DEFAULT_LAYER_POI
Definition:
Shape.h:45
Shape::DEFAULT_IMG_WIDTH
static const double DEFAULT_IMG_WIDTH
Definition:
Shape.h:49
src
utils
shapes
Shape.cpp
Generated on Thu Jan 16 2020 21:12:23 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16