Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIPostDrawing.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-2023 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// Operations that must be applied after drawGL()
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <vector>
25
26// ===========================================================================
27// class definitions
28// ===========================================================================
29
31
32public:
35
38
40 void markGLObjectToUpdate(GUIGlObject* GLObject);
41
43 void addElementUnderCursor(const GUIGlObject* GLObject);
44
46 bool isElementUnderCursor(const GUIGlObject* GLObject) const;
47
49 bool isTopElementUnderCursor(const GUIGlObject* GLObject) const;
50
52 const std::vector<const GUIGlObject*>& getElementUnderCursor() const;
53
55 std::vector<const GUIGlObject*> elementsMarkedToRemove;
56
58 std::vector<const GUIGlObject*> elementsMarkedToSelect;
59
62
65
67 const GUIGlObject* markedNode = nullptr;
68
70 const GUIGlObject* markedEdge = nullptr;
71
73 const GUIGlObject* markedLane = nullptr;
74
76 const GUIGlObject* markedTAZ = nullptr;
77
79 const GUIGlObject* markedRoute = nullptr;
80
83
86
87protected:
89 std::vector<GUIGlObject*> myGLObjectsToUpdate;
90
92 std::vector<const GUIGlObject*> myElementsUnderCursor;
93
95 const GUIGlObject* myTopElement = nullptr;
96
97private:
99 GUIPostDrawing(const GUIPostDrawing&) = default;
100
103};
GUIGlObjectType
@ GLO_NETWORK
The network - empty.
void markGLObjectToUpdate(GUIGlObject *GLObject)
mark GLObject to update (usually the geometry)
const GUIGlObject * markedLane
marked lane (used in create edge mode, for splitting)
std::vector< const GUIGlObject * > myElementsUnderCursor
elements under cursor
void executePostDrawingTasks()
execute post drawing tasks
GUIPostDrawing()
constructor
std::vector< const GUIGlObject * > elementsMarkedToRemove
elements marked for drawing remove contour (used in netedit)
const GUIGlObject * markedFirstGeometryPoint
marked first geometry point (used for moving/delete geometry points)
const std::vector< const GUIGlObject * > & getElementUnderCursor() const
get all elements under cursor
std::vector< GUIGlObject * > myGLObjectsToUpdate
GLObjects to update.
const GUIGlObject * markedSecondGeometryPoint
marked first geometry point (used for moving/delete geometry points)
bool isElementUnderCursor(const GUIGlObject *GLObject) const
check if element is under cursor
const GUIGlObject * myTopElement
top element (used during selecting and deleting)
void addElementUnderCursor(const GUIGlObject *GLObject)
add element into list of elements under cursor
const GUIGlObject * markedRoute
marked Route (used in create vehicle mode)
bool isTopElementUnderCursor(const GUIGlObject *GLObject) const
check if the given element is the top element under cursor
const GUIGlObject * markedTAZ
marked TAZ (used in create TAZRel mode)
GUIPostDrawing(const GUIPostDrawing &)=default
set copy constructor private
GUIGlObjectType recomputeBoundaries
recompute boundaries
const GUIGlObject * markedNode
marked Node (used in create edge mode)
GUIPostDrawing & operator=(const GUIPostDrawing &)=default
set assignment operator private
const GUIGlObject * markedEdge
marked edge (used in create edge mode, for splitting)
Position mousePos
mouse position before rendering elements
std::vector< const GUIGlObject * > elementsMarkedToSelect
elements marked for drawing selet contour(used in netedit)
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
static const Position INVALID
used to indicate that a position is valid
Definition Position.h:300