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
Polygon.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// A 2D- or 3D-polygon
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2001-2013 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 Polygon_h
22
#define Polygon_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 <
utils/geom/PositionVector.h
>
35
#include <
utils/common/Parameterised.h
>
36
#include "
Shape.h
"
37
38
// we need to put this into a namespace to avoid clashing with wingdi.h::Polygon function
39
namespace
SUMO {
40
41
// ===========================================================================
42
// class definitions
43
// ===========================================================================
48
class
Polygon
:
public
Shape
,
public
Parameterised
{
49
public
:
60
Polygon
(
const
std::string&
id
,
const
std::string& type,
61
const
RGBColor
& color,
const
PositionVector
& shape,
bool
fill,
62
SUMOReal
layer =
DEFAULT_LAYER
,
63
SUMOReal
angle =
DEFAULT_ANGLE
,
64
const
std::string& imgFile =
DEFAULT_IMG_FILE
);
65
66
68
virtual
~Polygon
();
69
70
71
74
78
inline
const
PositionVector
&
getShape
()
const
{
79
return
myShape
;
80
}
81
82
86
inline
bool
getFill
()
const
{
87
return
myFill
;
88
}
90
91
92
95
99
inline
void
setFill
(
bool
fill) {
100
myFill
= fill;
101
}
102
103
107
inline
virtual
void
setShape
(
const
PositionVector
& shape) {
108
myShape
= shape;
109
}
111
112
113
protected
:
115
PositionVector
myShape
;
116
118
bool
myFill
;
119
120
};
121
122
}
123
124
#endif
125
126
/****************************************************************************/
127
home
delphi
sumo
src
utils
shapes
Polygon.h
Generated by
1.8.2