Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEViewNetHelper::ObjectsUnderCursor Class Reference

class used to group all variables related with objects under cursor after a click over view More...

#include <GNEViewNetHelper.h>

Collaboration diagram for GNEViewNetHelper::ObjectsUnderCursor:
[legend]

Data Structures

class  ObjectsContainer
 objects container More...
 

Public Member Functions

void filterLockedElements (const GNEViewNetHelper::LockManager &lockManager, std::vector< GUIGlObjectType > forcedIgnoredTiped={})
 filter locked elements
 
GNEAdditionalgetAdditionalFront () const
 get front additional element or a pointer to nullptr
 
GNEAttributeCarriergetAttributeCarrierFront () const
 get front attribute carrier or a pointer to nullptr
 
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers () const
 get vector with clicked ACs
 
const std::vector< GNEDemandElement * > & getClickedDemandElements () const
 get vector with clicked Demand Elements
 
const std::vector< GUIGlObject * > & getClickedGLObjects () const
 get vector with clicked GL objects
 
const std::vector< GNEJunction * > & getClickedJunctions () const
 get vector with clicked junctions
 
GNEConnectiongetConnectionFront () const
 get front connection or a pointer to nullptr
 
GNECrossinggetCrossingFront () const
 get front crossing or a pointer to nullptr
 
GNEDemandElementgetDemandElementFront () const
 get front demand element or a pointer to nullptr
 
GNEEdgeDatagetEdgeDataElementFront () const
 get edge data element or a pointer to nullptr
 
GNEEdgegetEdgeFront () const
 get front edge or a pointer to nullptr
 
GNEEdgeRelDatagetEdgeRelDataElementFront () const
 get edge rel data element or a pointer to nullptr
 
GNEGenericDatagetGenericDataElementFront () const
 get generic data element or a pointer to nullptr
 
GUIGlID getGlIDFront () const
 get front GUI GL ID or a pointer to nullptr
 
GUIGlObjectType getGlTypeFront () const
 get front GUI GL object type or a pointer to nullptr
 
GUIGlObjectgetGUIGlObjectFront () const
 get front attribute carrier or a pointer to nullptr
 
GNEInternalLanegetInternalLaneFront () const
 get front internal lane or a pointer to nullptr
 
GNEJunctiongetJunctionFront () const
 get front junction or a pointer to nullptr
 
GNELanegetLaneFront () const
 get front lane or a pointer to nullptr
 
GNELanegetLaneFrontNonLocked () const
 get front lane or a pointer to nullptr checking if is locked
 
const std::vector< GNELane * > & getLanes () const
 get lanes
 
GNENetworkElementgetNetworkElementFront () const
 get front network element or a pointer to nullptr
 
GNEPOIgetPOIFront () const
 get front POI or a pointer to nullptr
 
GNEPolygetPolyFront () const
 get front Poly or a pointer to nullptr
 
GNETAZgetTAZFront () const
 get front TAZ or a pointer to nullptr
 
GNEWalkingAreagetWalkingAreaFront () const
 get front walkingArea or a pointer to nullptr
 
 ObjectsUnderCursor (GNEViewNet *viewNet)
 constructor
 
void shortDataElements ()
 short data elements by begin
 
void swapLane2Edge ()
 swap lane to edge
 
void updateObjectUnderCursor (const std::vector< GUIGlObject * > &GUIGlObjects)
 update objects under cursor (Called only in onLeftBtnPress(...) function)
 

Protected Attributes

ObjectsContainer myEdgeObjects
 objectContainer for objects selecting edges
 
ObjectsContainer myLaneObjects
 objectContainer for objects selecting lanes
 
bool mySwapLane2edge
 flag to enable/disable swap lane to edge
 
const GNEViewNetmyViewNet
 pointer to viewNet
 

Private Member Functions

std::vector< GUIGlObject * > filterDuplicatedObjects (const std::vector< GUIGlObject * > &GUIGlObjects) const
 filter duplicated objects
 
 ObjectsUnderCursor ()
 default constructor
 
 ObjectsUnderCursor (const ObjectsUnderCursor &)=delete
 Invalidated copy constructor.
 
ObjectsUnderCursoroperator= (const ObjectsUnderCursor &)=delete
 Invalidated assignment operator.
 
void processGUIGlObjects ()
 process GL objects
 
void sortGUIGlObjects (const std::vector< GUIGlObject * > &GUIGlObjects)
 sort by altitude and update GUIGlObjects
 
void updateAdditionalElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update additional elements
 
void updateAttributeCarriers (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update attribute carrier elements
 
void updateDemandElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update demand elements
 
void updateGenericDataElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update generic data elements
 
void updateGUIGlObjects (ObjectsContainer &container)
 updateGUIGlObjects
 
void updateNetworkElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update network elements
 
void updateShapeElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update shape elements
 
void updateTAZElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update TAZ elements
 

Detailed Description

class used to group all variables related with objects under cursor after a click over view

Definition at line 215 of file GNEViewNetHelper.h.

Constructor & Destructor Documentation

◆ ObjectsUnderCursor() [1/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( GNEViewNet viewNet)

constructor

Definition at line 210 of file GNEViewNetHelper.cpp.

◆ ObjectsUnderCursor() [2/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( )
private

default constructor

Definition at line 1122 of file GNEViewNetHelper.cpp.

◆ ObjectsUnderCursor() [3/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( const ObjectsUnderCursor )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ filterDuplicatedObjects()

std::vector< GUIGlObject * > GNEViewNetHelper::ObjectsUnderCursor::filterDuplicatedObjects ( const std::vector< GUIGlObject * > &  GUIGlObjects) const
private

filter duplicated objects

Definition at line 739 of file GNEViewNetHelper.cpp.

◆ filterLockedElements()

void GNEViewNetHelper::ObjectsUnderCursor::filterLockedElements ( const GNEViewNetHelper::LockManager lockManager,
std::vector< GUIGlObjectType forcedIgnoredTiped = {} 
)

filter locked elements

Definition at line 240 of file GNEViewNetHelper.cpp.

References GNEViewNetHelper::LockManager::isObjectLocked().

Referenced by GNEViewNet::processLeftButtonPressData(), GNEViewNet::processLeftButtonPressDemand(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getAdditionalFront()

GNEAdditional * GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront ( ) const

get front additional element or a pointer to nullptr

Definition at line 361 of file GNEViewNetHelper.cpp.

Referenced by GNEContainerFrame::addContainer(), GNEContainerPlanFrame::addContainerPlanElement(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), GNEAdditionalFrame::createBaseAdditionalObject(), GNEWireFrame::createBaseWireObject(), GNETLSEditorFrame::editTLS(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getAttributeCarrierFront()

GNEAttributeCarrier * GNEViewNetHelper::ObjectsUnderCursor::getAttributeCarrierFront ( ) const

◆ getClickedAttributeCarriers()

const std::vector< GNEAttributeCarrier * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedAttributeCarriers ( ) const

get vector with clicked ACs

Definition at line 682 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeGeometryPoint(), and GNEOverlappedInspection::showOverlappedInspection().

Here is the caller graph for this function:

◆ getClickedDemandElements()

const std::vector< GNEDemandElement * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedDemandElements ( ) const

get vector with clicked Demand Elements

Definition at line 702 of file GNEViewNetHelper.cpp.

Referenced by GNEPersonPlanFrame::addPersonPlanElement().

Here is the caller graph for this function:

◆ getClickedGLObjects()

const std::vector< GUIGlObject * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedGLObjects ( ) const

get vector with clicked GL objects

Definition at line 672 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::openObjectDialogAtCursor(), GNEDeleteFrame::removeAttributeCarrier(), and GNESelectorFrame::selectAttributeCarrier().

Here is the caller graph for this function:

◆ getClickedJunctions()

const std::vector< GNEJunction * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedJunctions ( ) const

get vector with clicked junctions

Definition at line 692 of file GNEViewNetHelper.cpp.

Referenced by GNEJunction::commitMoveShape().

Here is the caller graph for this function:

◆ getConnectionFront()

GNEConnection * GNEViewNetHelper::ObjectsUnderCursor::getConnectionFront ( ) const

get front connection or a pointer to nullptr

Definition at line 547 of file GNEViewNetHelper.cpp.

Referenced by GNEProhibitionFrame::handleProhibitionClick(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getCrossingFront()

GNECrossing * GNEViewNetHelper::ObjectsUnderCursor::getCrossingFront ( ) const

get front crossing or a pointer to nullptr

Definition at line 511 of file GNEViewNetHelper.cpp.

◆ getDemandElementFront()

GNEDemandElement * GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront ( ) const

get front demand element or a pointer to nullptr

Definition at line 379 of file GNEViewNetHelper.cpp.

Referenced by GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), and GNEVehicleFrame::addVehicle().

Here is the caller graph for this function:

◆ getEdgeDataElementFront()

GNEEdgeData * GNEViewNetHelper::ObjectsUnderCursor::getEdgeDataElementFront ( ) const

get edge data element or a pointer to nullptr

Definition at line 637 of file GNEViewNetHelper.cpp.

◆ getEdgeFront()

GNEEdge * GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront ( ) const

◆ getEdgeRelDataElementFront()

GNEEdgeRelData * GNEViewNetHelper::ObjectsUnderCursor::getEdgeRelDataElementFront ( ) const

get edge rel data element or a pointer to nullptr

Definition at line 655 of file GNEViewNetHelper.cpp.

◆ getGenericDataElementFront()

GNEGenericData * GNEViewNetHelper::ObjectsUnderCursor::getGenericDataElementFront ( ) const

get generic data element or a pointer to nullptr

Definition at line 397 of file GNEViewNetHelper.cpp.

◆ getGlIDFront()

GUIGlID GNEViewNetHelper::ObjectsUnderCursor::getGlIDFront ( ) const

get front GUI GL ID or a pointer to nullptr

Definition at line 287 of file GNEViewNetHelper.cpp.

◆ getGlTypeFront()

GUIGlObjectType GNEViewNetHelper::ObjectsUnderCursor::getGlTypeFront ( ) const

get front GUI GL object type or a pointer to nullptr

Definition at line 297 of file GNEViewNetHelper.cpp.

References GLO_NETWORK.

◆ getGUIGlObjectFront()

GUIGlObject * GNEViewNetHelper::ObjectsUnderCursor::getGUIGlObjectFront ( ) const

get front attribute carrier or a pointer to nullptr

Definition at line 307 of file GNEViewNetHelper.cpp.

◆ getInternalLaneFront()

GNEInternalLane * GNEViewNetHelper::ObjectsUnderCursor::getInternalLaneFront ( ) const

get front internal lane or a pointer to nullptr

Definition at line 565 of file GNEViewNetHelper.cpp.

◆ getJunctionFront()

GNEJunction * GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront ( ) const

get front junction or a pointer to nullptr

Definition at line 415 of file GNEViewNetHelper.cpp.

Referenced by GNEContainerFrame::addContainer(), GNECrossingFrame::addCrossing(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEVehicleFrame::addVehicle(), GNETLSEditorFrame::editTLS(), GNECreateEdgeFrame::processClick(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getLaneFront()

GNELane * GNEViewNetHelper::ObjectsUnderCursor::getLaneFront ( ) const

get front lane or a pointer to nullptr

Definition at line 451 of file GNEViewNetHelper.cpp.

Referenced by GNEAdditionalFrame::addAdditional(), GNEStopFrame::addStop(), GNEWireFrame::addWire(), GNEShapeFrame::processClick(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), and GNEViewNet::processLeftButtonReleaseNetwork().

Here is the caller graph for this function:

◆ getLaneFrontNonLocked()

GNELane * GNEViewNetHelper::ObjectsUnderCursor::getLaneFrontNonLocked ( ) const

get front lane or a pointer to nullptr checking if is locked

Definition at line 469 of file GNEViewNetHelper.cpp.

Referenced by GNEConnectorFrame::handleLaneClick(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getLanes()

const std::vector< GNELane * > & GNEViewNetHelper::ObjectsUnderCursor::getLanes ( ) const

get lanes

Definition at line 501 of file GNEViewNetHelper.cpp.

Referenced by GNEConnectorFrame::handleLaneClick().

Here is the caller graph for this function:

◆ getNetworkElementFront()

GNENetworkElement * GNEViewNetHelper::ObjectsUnderCursor::getNetworkElementFront ( ) const

get front network element or a pointer to nullptr

Definition at line 343 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getPOIFront()

GNEPOI * GNEViewNetHelper::ObjectsUnderCursor::getPOIFront ( ) const

get front POI or a pointer to nullptr

Definition at line 583 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getPolyFront()

GNEPoly * GNEViewNetHelper::ObjectsUnderCursor::getPolyFront ( ) const

get front Poly or a pointer to nullptr

Definition at line 601 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeGeometryPoint().

Here is the caller graph for this function:

◆ getTAZFront()

GNETAZ * GNEViewNetHelper::ObjectsUnderCursor::getTAZFront ( ) const

get front TAZ or a pointer to nullptr

Definition at line 619 of file GNEViewNetHelper.cpp.

Referenced by GNEVehicleFrame::addVehicle(), GNETAZFrame::processClick(), GNEDeleteFrame::removeGeometryPoint(), and GNETAZRelDataFrame::setTAZ().

Here is the caller graph for this function:

◆ getWalkingAreaFront()

GNEWalkingArea * GNEViewNetHelper::ObjectsUnderCursor::getWalkingAreaFront ( ) const

get front walkingArea or a pointer to nullptr

Definition at line 529 of file GNEViewNetHelper.cpp.

◆ operator=()

ObjectsUnderCursor & GNEViewNetHelper::ObjectsUnderCursor::operator= ( const ObjectsUnderCursor )
privatedelete

Invalidated assignment operator.

◆ processGUIGlObjects()

◆ shortDataElements()

void GNEViewNetHelper::ObjectsUnderCursor::shortDataElements ( )

short data elements by begin

Definition at line 268 of file GNEViewNetHelper.cpp.

References SUMO_ATTR_BEGIN, and SUMO_ATTR_END.

Referenced by GNEViewNet::onLeftBtnPress().

Here is the caller graph for this function:

◆ sortGUIGlObjects()

void GNEViewNetHelper::ObjectsUnderCursor::sortGUIGlObjects ( const std::vector< GUIGlObject * > &  GUIGlObjects)
private

sort by altitude and update GUIGlObjects

Definition at line 755 of file GNEViewNetHelper.cpp.

References Shape::getShapeLayer(), GLO_LANE, and GLO_NETWORKELEMENT.

◆ swapLane2Edge()

void GNEViewNetHelper::ObjectsUnderCursor::swapLane2Edge ( )

swap lane to edge

Definition at line 233 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ updateAdditionalElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateAdditionalElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

◆ updateAttributeCarriers()

void GNEViewNetHelper::ObjectsUnderCursor::updateAttributeCarriers ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

◆ updateDemandElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateDemandElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

◆ updateGenericDataElements()

◆ updateGUIGlObjects()

void GNEViewNetHelper::ObjectsUnderCursor::updateGUIGlObjects ( ObjectsContainer container)
private

◆ updateNetworkElements()

◆ updateObjectUnderCursor()

void GNEViewNetHelper::ObjectsUnderCursor::updateObjectUnderCursor ( const std::vector< GUIGlObject * > &  GUIGlObjects)

update objects under cursor (Called only in onLeftBtnPress(...) function)

Definition at line 217 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::onLeftBtnPress(), GNEViewNet::onLeftBtnRelease(), GNEViewNet::openObjectDialogAtCursor(), GNEViewNet::processLeftButtonReleaseNetwork(), GNEViewNet::updateObjectsUnderCursor(), and GNECreateEdgeFrame::updateObjectsUnderSnappedCursor().

Here is the caller graph for this function:

◆ updateShapeElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateShapeElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

◆ updateTAZElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateTAZElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

Field Documentation

◆ myEdgeObjects

ObjectsContainer GNEViewNetHelper::ObjectsUnderCursor::myEdgeObjects
protected

objectContainer for objects selecting edges

Definition at line 388 of file GNEViewNetHelper.h.

◆ myLaneObjects

ObjectsContainer GNEViewNetHelper::ObjectsUnderCursor::myLaneObjects
protected

objectContainer for objects selecting lanes

Definition at line 391 of file GNEViewNetHelper.h.

◆ mySwapLane2edge

bool GNEViewNetHelper::ObjectsUnderCursor::mySwapLane2edge
protected

flag to enable/disable swap lane to edge

Definition at line 394 of file GNEViewNetHelper.h.

◆ myViewNet

const GNEViewNet* GNEViewNetHelper::ObjectsUnderCursor::myViewNet
protected

pointer to viewNet

Definition at line 385 of file GNEViewNetHelper.h.


The documentation for this class was generated from the following files: