SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Shape.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// A 2D- or 3D-Shape
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2012-2014 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef Shape_h
22
#define Shape_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <string>
35
#include <
utils/common/Named.h
>
36
#include <
utils/common/RGBColor.h
>
37
38
39
// ===========================================================================
40
// class definitions
41
// ===========================================================================
46
class
Shape
:
public
Named
{
47
public
:
56
Shape
(
const
std::string&
id
,
const
std::string& type,
57
const
RGBColor
& color,
SUMOReal
layer,
58
SUMOReal
angle,
const
std::string& imgFile);
59
60
62
virtual
~Shape
();
63
64
67
71
inline
const
std::string&
getType
()
const
{
72
return
myType
;
73
}
74
75
79
inline
const
RGBColor
&
getColor
()
const
{
80
return
myColor
;
81
}
82
83
87
inline
SUMOReal
getLayer
()
const
{
88
return
myLayer
;
89
}
90
94
inline
SUMOReal
getAngle
()
const
{
95
return
myAngle
;
96
}
97
101
inline
const
std::string&
getImgFile
()
const
{
102
return
myImgFile
;
103
}
105
106
109
113
inline
void
setType
(
const
std::string& type) {
114
myType
= type;
115
}
116
117
121
inline
void
setColor
(
const
RGBColor
& col) {
122
myColor
= col;
123
}
124
125
129
inline
void
setLayer
(
const
SUMOReal
layer) {
130
myLayer
= layer;
131
}
132
133
137
inline
void
setAngle
(
const
SUMOReal
angle) {
138
myAngle
= angle;
139
}
140
144
inline
void
setImgFile
(
const
std::string& imgFile) {
145
myImgFile
= imgFile;
146
}
148
149
static
const
std::string
DEFAULT_TYPE
;
150
static
const
SUMOReal
DEFAULT_LAYER
;
151
static
const
SUMOReal
DEFAULT_ANGLE
;
152
static
const
std::string
DEFAULT_IMG_FILE
;
153
static
const
SUMOReal
DEFAULT_IMG_WIDTH
;
154
static
const
SUMOReal
DEFAULT_IMG_HEIGHT
;
155
156
protected
:
158
std::string
myType
;
159
161
RGBColor
myColor
;
162
164
SUMOReal
myLayer
;
165
167
SUMOReal
myAngle
;
168
170
std::string
myImgFile
;
171
};
172
173
174
#endif
175
176
/****************************************************************************/
177
tmp
buildd
sumo-0.21.0+dfsg
src
utils
shapes
Shape.h
Generated on Thu Nov 20 2014 19:49:59 for SUMO - Simulation of Urban MObility by
1.8.1.2