Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEContour.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 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/****************************************************************************/
18// class used for show contour elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
29class GNENet;
30class GNEEdge;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
38
39public:
41 GNEContour();
42
45
48
50 void clearContour() const;
51
54
57 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
58 const double scale) const;
59
62 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
63 const double extrusionWidth, const double scale, const bool closeFirstExtrem,
64 const bool closeLastExtrem, const double offset) const;
65
68 const GUIGlObject* glObject, const Position& pos, const double width, const double height,
69 const double layer, const double offsetX, const double offsetY, const double rot,
70 const double scale) const;
71
74 const GUIGlObject* glObject, const Position& pos, double radius, const double layer,
75 const double scale) const;
76
79 const GNEEdge* edge, const GUIGlObject* elementToRegister, const double layer,
80 const bool closeFirstExtrem, const bool closeLastExtrem) const;
81
84 const GNEEdge* fromEdge, const GNEEdge* toEdge) const;
85
88 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
89 const double radius, const double scale) const;
90
93 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
94 const double radius, const double scale) const;
95
98 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
99 const double radius, const double scale) const;
100
103 const GUIGlObject* glObject, const PositionVector& shape, const double layer,
104 const double radius, const double scale, const bool calculatePosOverShape) const;
105
108 const GNEEdge* edge, const double radius, const bool calculatePosOverShape,
109 const bool firstExtrem, const bool lastExtrem) const;
111
114
117 const GNEAttributeCarrier* AC) const;
118
121 const GNEAttributeCarrier* AC, const double lineWidth, const bool addOffset) const;
122
125 const GNEAttributeCarrier* AC, const PositionVector& shape, const double radius,
126 const double scale, const double lineWidth) const;
127
130 const PositionVector& shape, const double scale, const double lineWidth) const;
132
133private:
135 std::vector<GUIDottedGeometry>* myDottedGeometries;
136
139
142
145
148
151 const PositionVector& shape, const double scale) const;
152
155 const PositionVector& shape, const double extrusionWidth, const double scale,
156 const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const;
157
160 const Position& pos, const double width, const double height, const double offsetX,
161 const double offsetY, const double rot, const double scale) const;
162
165 const Position& pos, double radius, const double scale) const;
166
169 const GNEEdge* edge, const bool closeFirstExtrem, const bool closeLastExtrem) const;
170
173 const GNEEdge* fromEdge, const GNEEdge* toEdge) const;
175
178 const double lineWidth, const bool addOffset) const;
179
181 GNEContour(const GNEContour&) = delete;
182
184 GNEContour& operator=(const GNEContour& src) = delete;
185};
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
void calculateContourLastGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for last geometry point
GNEContour()
Constructor.
void calculateContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
calculate contour extruded (used in elements formed by a central shape)
static GUIDottedGeometry::DottedGeometryColor myDottedGeometryColor
dotted geometry color
Definition GNEContour.h:144
void calculateContourCircleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double layer, const double scale) const
calculate contour (circle elements)
void buildContourCircle(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, double radius, const double scale) const
build contour aorund circle
void calculateContourRectangleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, const double width, const double height, const double layer, const double offsetX, const double offsetY, const double rot, const double scale) const
calculate contour (for rectangled elements)
void calculateContourEdges(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
calculate contour between two consecutive edges
void buildContourEdge(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const bool closeFirstExtrem, const bool closeLastExtrem) const
build contour around edge
void buildContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
build contour around extruded shape (ej. lane)
void buildContourRectangle(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double scale) const
build contour around rectangle
GNEContour(const GNEContour &)=delete
Invalidated copy constructor.
std::vector< GUIDottedGeometry > * myDottedGeometries
dotted geometries
Definition GNEContour.h:135
PositionVector * myCalculatedShape
calculated shape
Definition GNEContour.h:141
void clearContour() const
void clear contour
void drawDottedContourGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const PositionVector &shape, const double radius, const double scale, const double lineWidth) const
draw dotted contour for geometry points
void calculateContourMiddleGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for middle geometry point
void calculateContourFirstGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for first geometry point
void calculateContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale) const
calculate contours
void buildContourEdges(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
build contour between two from-to edgeds
Boundary * myContourBoundary
contourboundary
Definition GNEContour.h:138
void calculateContourEdgeGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const double radius, const bool calculatePosOverShape, const bool firstExtrem, const bool lastExtrem) const
calculate contour for edge geometry points
void calculateContourEdge(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const GUIGlObject *elementToRegister, const double layer, const bool closeFirstExtrem, const bool closeLastExtrem) const
calculate contour edge
void drawInnenContourClosed(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale, const double lineWidth) const
draw innen contour (currently used only in walkingAreas)
void drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
Boundary getContourBoundary() const
get contour boundary
GNEContour & operator=(const GNEContour &src)=delete
Invalidated assignment operator.
~GNEContour()
destructor
void buildContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale) const
build contour around closed shape (ej. polygon)
void calculateContourAllGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale, const bool calculatePosOverShape) const
calculate contour for all geometry points
void drawDottedContour(const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset) const
draw dotted contour
bool checkDrawPathContour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC) const
drawing contour functions
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
class for pack all variables related with GUIDottedGeometry color
Stores the information about how to visualize structures.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.