![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GUIPostDrawing.h>
Public Member Functions | |
void | addElementUnderCursor (const GUIGlObject *GLObject) |
add element into list of elements under cursor | |
void | executePostDrawingTasks () |
execute post drawing tasks | |
const std::vector< const GUIGlObject * > & | getElementUnderCursor () const |
get all elements under cursor | |
GUIPostDrawing () | |
constructor | |
bool | isElementUnderCursor (const GUIGlObject *GLObject) const |
check if element is under cursor | |
bool | isTopElementUnderCursor (const GUIGlObject *GLObject) const |
check if the given element is the top element under cursor | |
void | markGLObjectToUpdate (GUIGlObject *GLObject) |
mark GLObject to update (usually the geometry) | |
Data Fields | |
std::vector< const GUIGlObject * > | elementsMarkedToRemove |
elements marked for drawing remove contour (used in netedit) | |
std::vector< const GUIGlObject * > | elementsMarkedToSelect |
elements marked for drawing selet contour(used in netedit) | |
const GUIGlObject * | markedEdge = nullptr |
marked edge (used in create edge mode, for splitting) | |
const GUIGlObject * | markedFirstGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points) | |
const GUIGlObject * | markedLane = nullptr |
marked lane (used in create edge mode, for splitting) | |
const GUIGlObject * | markedNode = nullptr |
marked Node (used in create edge mode) | |
const GUIGlObject * | markedRoute = nullptr |
marked Route (used in create vehicle mode) | |
const GUIGlObject * | markedSecondGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points) | |
const GUIGlObject * | markedTAZ = nullptr |
marked TAZ (used in create TAZRel mode) | |
Position | mousePos = Position::INVALID |
mouse position before rendering elements | |
GUIGlObjectType | recomputeBoundaries = GLO_NETWORK |
recompute boundaries | |
Protected Attributes | |
std::vector< const GUIGlObject * > | myElementsUnderCursor |
elements under cursor | |
std::vector< GUIGlObject * > | myGLObjectsToUpdate |
GLObjects to update. | |
const GUIGlObject * | myTopElement = nullptr |
top element (used during selecting and deleting) | |
Private Member Functions | |
GUIPostDrawing (const GUIPostDrawing &)=default | |
set copy constructor private | |
GUIPostDrawing & | operator= (const GUIPostDrawing &)=default |
set assignment operator private | |
Definition at line 30 of file GUIPostDrawing.h.
GUIPostDrawing::GUIPostDrawing | ( | ) |
constructor
Definition at line 26 of file GUIPostDrawing.cpp.
|
privatedefault |
set copy constructor private
void GUIPostDrawing::addElementUnderCursor | ( | const GUIGlObject * | GLObject | ) |
add element into list of elements under cursor
Definition at line 65 of file GUIPostDrawing.cpp.
References GUIGlObject::getType(), myElementsUnderCursor, and myTopElement.
Referenced by GUIGlObject::mouseWithinGeometry(), GUIGlObject::mouseWithinGeometry(), GUIGlObject::mouseWithinGeometry(), GUIGlObject::mouseWithinGeometry(), and GUIGlObject::mouseWithinGeometry().
void GUIPostDrawing::executePostDrawingTasks | ( | ) |
execute post drawing tasks
Definition at line 30 of file GUIPostDrawing.cpp.
References elementsMarkedToRemove, elementsMarkedToSelect, GLO_NETWORK, Position::INVALID, markedEdge, markedFirstGeometryPoint, markedLane, markedNode, markedRoute, markedSecondGeometryPoint, markedTAZ, mousePos, myElementsUnderCursor, myGLObjectsToUpdate, myTopElement, and recomputeBoundaries.
Referenced by GNEViewNet::doPaintGL().
const std::vector< const GUIGlObject * > & GUIPostDrawing::getElementUnderCursor | ( | ) | const |
get all elements under cursor
Definition at line 92 of file GUIPostDrawing.cpp.
References myElementsUnderCursor.
bool GUIPostDrawing::isElementUnderCursor | ( | const GUIGlObject * | GLObject | ) | const |
check if element is under cursor
Definition at line 76 of file GUIPostDrawing.cpp.
References myElementsUnderCursor.
Referenced by GNEViewNet::drawDeleteContour(), and GNEViewNet::drawSelectContour().
bool GUIPostDrawing::isTopElementUnderCursor | ( | const GUIGlObject * | GLObject | ) | const |
check if the given element is the top element under cursor
Definition at line 82 of file GUIPostDrawing.cpp.
References GUIGlObject::getType(), and myTopElement.
Referenced by GNEViewNet::drawDeleteContour(), and GNEViewNet::drawSelectContour().
void GUIPostDrawing::markGLObjectToUpdate | ( | GUIGlObject * | GLObject | ) |
mark GLObject to update (usually the geometry)
Definition at line 57 of file GUIPostDrawing.cpp.
References myGLObjectsToUpdate.
Referenced by GNETAZRelData::drawGL().
|
privatedefault |
set assignment operator private
std::vector<const GUIGlObject*> GUIPostDrawing::elementsMarkedToRemove |
elements marked for drawing remove contour (used in netedit)
Definition at line 55 of file GUIPostDrawing.h.
Referenced by GNEViewNet::drawDeleteContour(), GNEViewNet::drawDeleteDottedContour(), and executePostDrawingTasks().
std::vector<const GUIGlObject*> GUIPostDrawing::elementsMarkedToSelect |
elements marked for drawing selet contour(used in netedit)
Definition at line 58 of file GUIPostDrawing.h.
Referenced by GNEViewNet::drawSelectContour(), GNEViewNet::drawSelectDottedContour(), and executePostDrawingTasks().
const GUIGlObject* GUIPostDrawing::markedEdge = nullptr |
marked edge (used in create edge mode, for splitting)
Definition at line 70 of file GUIPostDrawing.h.
Referenced by GNELane::checkMouseOverLane(), GNEViewNet::drawTemporalSplitJunction(), and executePostDrawingTasks().
const GUIGlObject* GUIPostDrawing::markedFirstGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points)
Definition at line 82 of file GUIPostDrawing.h.
Referenced by GNEEdge::drawEdgeShape(), executePostDrawingTasks(), and GNEEdge::setGeometryPointColor().
const GUIGlObject* GUIPostDrawing::markedLane = nullptr |
marked lane (used in create edge mode, for splitting)
Definition at line 73 of file GUIPostDrawing.h.
Referenced by GNELane::checkMouseOverLane(), and executePostDrawingTasks().
const GUIGlObject* GUIPostDrawing::markedNode = nullptr |
marked Node (used in create edge mode)
Definition at line 67 of file GUIPostDrawing.h.
Referenced by GNEJunction::drawDottedContoursBubble(), GNEJunction::drawDottedContoursShape(), and executePostDrawingTasks().
const GUIGlObject* GUIPostDrawing::markedRoute = nullptr |
marked Route (used in create vehicle mode)
Definition at line 79 of file GUIPostDrawing.h.
Referenced by GNEViewNet::doPaintGL(), GNERoute::drawPartialGL(), GNERoute::drawPartialGL(), and executePostDrawingTasks().
const GUIGlObject* GUIPostDrawing::markedSecondGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points)
Definition at line 85 of file GUIPostDrawing.h.
Referenced by executePostDrawingTasks(), and GNEEdge::setGeometryPointColor().
const GUIGlObject* GUIPostDrawing::markedTAZ = nullptr |
marked TAZ (used in create TAZRel mode)
Definition at line 76 of file GUIPostDrawing.h.
Referenced by GNETAZ::drawDottedContours(), and executePostDrawingTasks().
Position GUIPostDrawing::mousePos = Position::INVALID |
mouse position before rendering elements
Definition at line 64 of file GUIPostDrawing.h.
Referenced by GNEViewNet::doPaintGL(), executePostDrawingTasks(), GUIGlObject::mouseWithinGeometry(), GUIGlObject::mouseWithinGeometry(), GUIGlObject::mouseWithinGeometry(), GUIGlObject::mouseWithinGeometry(), and GUIGlObject::mouseWithinGeometry().
|
protected |
elements under cursor
Definition at line 92 of file GUIPostDrawing.h.
Referenced by addElementUnderCursor(), executePostDrawingTasks(), getElementUnderCursor(), and isElementUnderCursor().
|
protected |
GLObjects to update.
Definition at line 89 of file GUIPostDrawing.h.
Referenced by executePostDrawingTasks(), and markGLObjectToUpdate().
|
protected |
top element (used during selecting and deleting)
Definition at line 95 of file GUIPostDrawing.h.
Referenced by addElementUnderCursor(), executePostDrawingTasks(), and isTopElementUnderCursor().
GUIGlObjectType GUIPostDrawing::recomputeBoundaries = GLO_NETWORK |
recompute boundaries
Definition at line 61 of file GUIPostDrawing.h.
Referenced by executePostDrawingTasks(), and GUIDialog_ViewSettings::SizePanel::onCmdSizeChange().