SUMO - Simulation of Urban MObility
GNEViewNet::SelectingArea Struct Reference

struct used to group all variables related with selecting using a square or polygon More...

Collaboration diagram for GNEViewNet::SelectingArea:
Collaboration graph

Public Member Functions

void beginRectangleSelection ()
 begin rectangle selection More...
 
void drawRectangleSelection (const RGBColor &color) const
 draw rectangle selection More...
 
void finishRectangleSelection ()
 finish rectangle selection More...
 
void moveRectangleSelection ()
 move rectangle selection More...
 
std::vector< GNEEdge * > processEdgeRectangleSelection ()
 process rectangle Selection (only limited to Edges) More...
 
void processRectangleSelection ()
 process rectangle Selection More...
 
void processShapeSelection (const PositionVector &shape)
 process shape selection More...
 
 SelectingArea (GNEViewNet *viewNet)
 default constructor More...
 

Data Fields

bool selectingUsingRectangle
 whether we have started rectangle-selection More...
 
bool startDrawing
 whether we have started rectangle-selection More...
 

Private Member Functions

void processBoundarySelection (const Boundary &boundary)
 Process boundary Selection. More...
 

Private Attributes

GNEViewNetmyViewNet
 pointer to viewNet More...
 
Position selectionCorner1
 firstcorner of the rectangle-selection More...
 
Position selectionCorner2
 second corner of the rectangle-selection More...
 

Detailed Description

struct used to group all variables related with selecting using a square or polygon

Note
in the future the variables used for selecting throught a polygon will be placed here

Definition at line 668 of file GNEViewNet.h.

Constructor & Destructor Documentation

◆ SelectingArea()

GNEViewNet::SelectingArea::SelectingArea ( GNEViewNet viewNet)

default constructor

Definition at line 3570 of file GNEViewNet.cpp.

Member Function Documentation

◆ beginRectangleSelection()

void GNEViewNet::SelectingArea::beginRectangleSelection ( )

◆ drawRectangleSelection()

void GNEViewNet::SelectingArea::drawRectangleSelection ( const RGBColor color) const

draw rectangle selection

Definition at line 3657 of file GNEViewNet.cpp.

References GLO_MAX, selectingUsingRectangle, selectionCorner1, selectionCorner2, GLHelper::setColor(), Position::x(), and Position::y().

Referenced by GNEViewNet::doPaintGL().

◆ finishRectangleSelection()

void GNEViewNet::SelectingArea::finishRectangleSelection ( )

finish rectangle selection

Definition at line 3599 of file GNEViewNet.cpp.

References selectingUsingRectangle, and startDrawing.

Referenced by GNEViewNet::onLeftBtnRelease().

◆ moveRectangleSelection()

void GNEViewNet::SelectingArea::moveRectangleSelection ( )

◆ processBoundarySelection()

◆ processEdgeRectangleSelection()

std::vector< GNEEdge * > GNEViewNet::SelectingArea::processEdgeRectangleSelection ( )

◆ processRectangleSelection()

void GNEViewNet::SelectingArea::processRectangleSelection ( )

◆ processShapeSelection()

void GNEViewNet::SelectingArea::processShapeSelection ( const PositionVector shape)

process shape selection

Definition at line 3651 of file GNEViewNet.cpp.

References PositionVector::getBoxBoundary(), and processBoundarySelection().

Field Documentation

◆ myViewNet

GNEViewNet* GNEViewNet::SelectingArea::myViewNet
private

◆ selectingUsingRectangle

bool GNEViewNet::SelectingArea::selectingUsingRectangle

◆ selectionCorner1

Position GNEViewNet::SelectingArea::selectionCorner1
private

firstcorner of the rectangle-selection

Definition at line 705 of file GNEViewNet.h.

Referenced by beginRectangleSelection(), drawRectangleSelection(), moveRectangleSelection(), processEdgeRectangleSelection(), and processRectangleSelection().

◆ selectionCorner2

Position GNEViewNet::SelectingArea::selectionCorner2
private

second corner of the rectangle-selection

Definition at line 708 of file GNEViewNet.h.

Referenced by beginRectangleSelection(), drawRectangleSelection(), moveRectangleSelection(), processEdgeRectangleSelection(), and processRectangleSelection().

◆ startDrawing

bool GNEViewNet::SelectingArea::startDrawing

whether we have started rectangle-selection

Definition at line 698 of file GNEViewNet.h.

Referenced by finishRectangleSelection(), moveRectangleSelection(), and GNEViewNet::onLeftBtnRelease().


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