Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEContour Class Reference

#include <GNEContour.h>

Collaboration diagram for GNEContour:
[legend]

Public Member Functions

void clearContour () const
 void clear contour
 
Boundary getContourBoundary () const
 get contour boundary
 
 GNEContour ()
 Constructor.
 
 ~GNEContour ()
 destructor
 
void calculateContourClosedShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
 calculate contours
 
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 GNESegment *segment, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
 calculate contour extruded (used in elements formed by a central shape)
 
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 GUIGlObject *boundaryParent) const
 calculate contour (for rectangled elements)
 
void calculateContourCircleShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double layer, const double scale, const GUIGlObject *boundaryParent) const
 calculate contour (circle elements)
 
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 calculateContourEdges (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
 calculate contour between two consecutive edges
 
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 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
 
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 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 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
 
bool checkDrawPathContour (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC) const
 drawing contour functions
 
bool 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...)
 
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 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)
 
bool drawDottedContour (const GUIVisualizationSettings &s, GUIDottedGeometry::DottedContourType type, const double lineWidth, const bool addOffset) const
 draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)
 

Private Member Functions

 GNEContour (const GNEContour &)=delete
 Invalidated copy constructor.
 
GNEContouroperator= (const GNEContour &src)=delete
 Invalidated assignment operator.
 
build contour functions
void buildContourClosedShape (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const PositionVector &shape, const double scale) const
 build contour around closed shape (ej. polygon)
 
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
 
void buildContourCircle (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const Position &pos, double radius, const double scale) const
 build contour aorund circle
 
void buildContourEdge (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const bool closeFirstExtrem, const bool closeLastExtrem) const
 build contour around edge
 
void buildContourEdges (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
 build contour between two from-to edgeds
 

Private Attributes

PositionVectormyCalculatedShape
 calculated shape
 
BoundarymyContourBoundary
 contourboundary
 
std::vector< GUIDottedGeometry > * myDottedGeometries
 dotted geometries
 

Static Private Attributes

static GUIDottedGeometry::DottedGeometryColor myDottedGeometryColor
 dotted geometry color
 

Detailed Description

Definition at line 38 of file GNEContour.h.

Constructor & Destructor Documentation

◆ GNEContour() [1/2]

GNEContour::GNEContour ( )

Constructor.

Definition at line 44 of file GNEContour.cpp.

◆ ~GNEContour()

GNEContour::~GNEContour ( )

destructor

Definition at line 51 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, and myDottedGeometries.

◆ GNEContour() [2/2]

GNEContour::GNEContour ( const GNEContour )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ buildContourCircle()

void GNEContour::buildContourCircle ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const Position pos,
double  radius,
const double  scale 
) const
private

build contour aorund circle

Definition at line 543 of file GNEContour.cpp.

References GUIVisualizationSettings::CircleResolution16, GUIVisualizationSettings::CircleResolution32, PositionVector::getBoxBoundary(), GUIGeometry::getVertexCircleAroundPosition(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), Position::x(), and Position::y().

Referenced by calculateContourCircleShape().

Here is the caller graph for this function:

◆ buildContourClosedShape()

void GNEContour::buildContourClosedShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const PositionVector shape,
const double  scale 
) const
private

build contour around closed shape (ej. polygon)

Definition at line 450 of file GNEContour.cpp.

References PositionVector::closePolygon(), PositionVector::getBoxBoundary(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), and PositionVector::scaleRelative().

Referenced by calculateContourClosedShape().

Here is the caller graph for this function:

◆ buildContourEdge()

void GNEContour::buildContourEdge ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge edge,
const bool  closeFirstExtrem,
const bool  closeLastExtrem 
) const
private

build contour around edge

Definition at line 573 of file GNEContour.cpp.

References OptionsCont::getBool(), PositionVector::getBoxBoundary(), GNELane::getDrawingConstants(), GNELane::DrawingConstants::getDrawingWidth(), GNELane::getLaneGeometry(), GNEEdge::getLanes(), GNELane::DrawingConstants::getOffset(), OptionsCont::getOptions(), GUIGeometry::getShape(), myCalculatedShape, myContourBoundary, myDottedGeometries, and PositionVector::reverse().

Referenced by calculateContourEdge().

Here is the caller graph for this function:

◆ buildContourEdges()

void GNEContour::buildContourEdges ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge fromEdge,
const GNEEdge toEdge 
) const
private

build contour between two from-to edgeds

Definition at line 614 of file GNEContour.cpp.

Referenced by calculateContourEdges().

Here is the caller graph for this function:

◆ buildContourExtrudedShape()

void GNEContour::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
private

build contour around extruded shape (ej. lane)

Definition at line 471 of file GNEContour.cpp.

References PositionVector::getBoxBoundary(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), and PositionVector::reverse().

Referenced by calculateContourExtrudedShape().

Here is the caller graph for this function:

◆ buildContourRectangle()

void GNEContour::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
private

build contour around rectangle

Definition at line 512 of file GNEContour.cpp.

References PositionVector::add(), DEG2RAD, PositionVector::getBoxBoundary(), myCalculatedShape, myContourBoundary, myDottedGeometries, Boundary::reset(), PositionVector::rotate2D(), and PositionVector::scaleRelative().

Referenced by calculateContourRectangleShape().

Here is the caller graph for this function:

◆ calculateContourAllGeometryPoints()

void GNEContour::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

Definition at line 195 of file GNEContour.cpp.

References GUIViewObjectsHandler::checkGeometryPoint(), GUIViewObjectsHandler::checkPositionOverShape(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNEConnection::calculateConnectionContour(), GNEAdditional::calculateContourPolygons(), GNECrossing::calculateCrossingContour(), GNEJunction::calculateJunctioncontour(), and GNELane::calculateLaneContour().

Here is the caller graph for this function:

◆ calculateContourCircleShape()

void GNEContour::calculateContourCircleShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const Position pos,
double  radius,
const double  layer,
const double  scale,
const GUIGlObject boundaryParent 
) const

◆ calculateContourClosedShape()

void GNEContour::calculateContourClosedShape ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  layer,
const double  scale,
const GUIGlObject boundaryParent,
const bool  addToSelectedObjects = true 
) const

calculate contours

calculate contour (for closed shapes)

Definition at line 75 of file GNEContour.cpp.

References buildContourClosedShape(), GUIViewObjectsHandler::checkRectangleSelection(), GUIViewObjectsHandler::checkShapeObject(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.

Referenced by GNEAdditional::calculateContourPolygons(), GNEJunction::calculateJunctioncontour(), and GNEWalkingArea::drawGL().

Here is the caller graph for this function:

◆ calculateContourEdge()

void GNEContour::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

Definition at line 136 of file GNEContour.cpp.

References buildContourEdge(), GUIViewObjectsHandler::checkShapeObject(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.

Referenced by GNEEdge::calculateEdgeContour(), GNEEdgeData::drawLanePartialGL(), and GNEEdgeRelData::drawLanePartialGL().

Here is the caller graph for this function:

◆ calculateContourEdgeGeometryPoints()

void GNEContour::calculateContourEdgeGeometryPoints ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge edge,
const double  radius,
const bool  calculatePosOverShape,
const bool  firstExtrem,
const bool  lastExtrem 
) const

◆ calculateContourEdges()

void GNEContour::calculateContourEdges ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GNEEdge fromEdge,
const GNEEdge toEdge 
) const

calculate contour between two consecutive edges

Definition at line 150 of file GNEContour.cpp.

References buildContourEdges().

Referenced by GNEEdgeRelData::drawJunctionPartialGL().

Here is the caller graph for this function:

◆ calculateContourExtrudedShape()

void GNEContour::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 GNESegment segment,
const GUIGlObject boundaryParent,
const bool  addToSelectedObjects = true 
) const

◆ calculateContourFirstGeometryPoint()

void GNEContour::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

Definition at line 158 of file GNEContour.cpp.

References GUIViewObjectsHandler::checkGeometryPoint(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNEStoppingPlace::calculateStoppingPlaceContour(), GNEEdge::drawEndGeometryPoint(), and GNEEdge::drawStartGeometryPoint().

Here is the caller graph for this function:

◆ calculateContourLastGeometryPoint()

void GNEContour::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

Definition at line 169 of file GNEContour.cpp.

References GUIViewObjectsHandler::checkGeometryPoint(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.

Referenced by GNEStoppingPlace::calculateStoppingPlaceContour().

Here is the caller graph for this function:

◆ calculateContourMiddleGeometryPoints()

void GNEContour::calculateContourMiddleGeometryPoints ( const GUIVisualizationSettings s,
const GUIVisualizationSettings::Detail  d,
const GUIGlObject glObject,
const PositionVector shape,
const double  layer,
const double  radius,
const double  scale 
) const

◆ calculateContourRectangleShape()

void GNEContour::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 GUIGlObject boundaryParent 
) const

◆ checkDrawPathContour()

◆ clearContour()

void GNEContour::clearContour ( ) const

void clear contour

Definition at line 65 of file GNEContour.cpp.

References myCalculatedShape, myContourBoundary, myDottedGeometries, and Boundary::reset().

Referenced by GNEAdditional::resetAdditionalContour(), GNEPoly::setAttribute(), and GNEJunction::setMoveShape().

Here is the caller graph for this function:

◆ drawDottedContour()

bool GNEContour::drawDottedContour ( const GUIVisualizationSettings s,
GUIDottedGeometry::DottedContourType  type,
const double  lineWidth,
const bool  addOffset 
) const

draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)

Definition at line 431 of file GNEContour.cpp.

References GLO_DOTTEDCONTOUR, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), GLHelper::pushMatrix(), and GUIDottedGeometry::DottedGeometryColor::reset().

Referenced by drawDottedContours(), and GNEWalkingArea::drawGL().

Here is the caller graph for this function:

◆ drawDottedContourGeometryPoints()

◆ drawDottedContours()

bool GNEContour::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...)

Definition at line 311 of file GNEContour.cpp.

References GNEAttributeCarrier::checkDrawDeleteContour(), GNEAttributeCarrier::checkDrawFromContour(), GNEAttributeCarrier::checkDrawFrontContour(), GNEAttributeCarrier::checkDrawInspectContour(), GNEAttributeCarrier::checkDrawMoveContour(), GNEAttributeCarrier::checkDrawOverContour(), GNEAttributeCarrier::checkDrawRelatedContour(), GNEAttributeCarrier::checkDrawSelectContour(), GNEAttributeCarrier::checkDrawToContour(), GUIVisualizationSettings::disableDottedContours, GUIVisualizationSettings::DottedContours, drawDottedContour(), GUIDottedGeometry::FROM, GUIDottedGeometry::FRONT, GUIDottedGeometry::INSPECT, GUIDottedGeometry::MOVE, GUIDottedGeometry::OVER, GUIDottedGeometry::RELATED, GUIDottedGeometry::REMOVE, GUIDottedGeometry::SELECT, and GUIDottedGeometry::TO.

Referenced by GNECalibrator::drawCalibratorSymbol(), GNEAccess::drawGL(), GNEBusStop::drawGL(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEEntryExitDetector::drawGL(), GNEInductionLoopDetector::drawGL(), GNEInstantInductionLoopDetector::drawGL(), GNELaneAreaDetector::drawGL(), GNEParkingArea::drawGL(), GNEParkingSpace::drawGL(), GNERerouterSymbol::drawGL(), GNERouteProbe::drawGL(), GNETAZ::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignSymbol::drawGL(), GNETAZRelData::drawGL(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEStop::drawGL(), GNEStopPlan::drawGL(), GNEVehicle::drawGL(), GNEConnection::drawGL(), GNECrossing::drawGL(), GNEEdge::drawGL(), GNEInternalLane::drawGL(), GNEJunction::drawGL(), GNELane::drawGL(), GNEWalkingArea::drawGL(), GNEPOI::drawGL(), GNEPoly::drawGL(), GNELaneAreaDetector::drawJunctionPartialGL(), GNEOverheadWire::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNEOverheadWire::drawLanePartialGL(), GNEEdgeData::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEAdditional::drawListedAdditional(), GNEDemandElementPlan::drawPlanGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), GNEDemandElementPlan::drawPlanLanePartial(), and GNEAdditional::drawSquaredAdditional().

Here is the caller graph for this function:

◆ drawInnenContourClosed()

void GNEContour::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)

Definition at line 406 of file GNEContour.cpp.

References PositionVector::closePolygon(), myCalculatedShape, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), GLHelper::pushMatrix(), GUIDottedGeometry::DottedGeometryColor::reset(), and PositionVector::scaleRelative().

Referenced by GNEWalkingArea::drawWalkingArea().

Here is the caller graph for this function:

◆ getContourBoundary()

Boundary GNEContour::getContourBoundary ( ) const

get contour boundary

Definition at line 59 of file GNEContour.cpp.

References myContourBoundary.

Referenced by GNEAdditional::getCenteringBoundary(), GNEConnection::getCenteringBoundary(), GNECrossing::getCenteringBoundary(), GNEEdgeType::getCenteringBoundary(), GNEInternalLane::getCenteringBoundary(), GNELane::getCenteringBoundary(), GNELaneType::getCenteringBoundary(), and GNEWalkingArea::getCenteringBoundary().

Here is the caller graph for this function:

◆ operator=()

GNEContour & GNEContour::operator= ( const GNEContour src)
privatedelete

Invalidated assignment operator.

Field Documentation

◆ myCalculatedShape

◆ myContourBoundary

◆ myDottedGeometries

◆ myDottedGeometryColor

GUIDottedGeometry::DottedGeometryColor GNEContour::myDottedGeometryColor
staticprivate

dotted geometry color

Definition at line 151 of file GNEContour.h.

Referenced by drawDottedContour(), drawDottedContourGeometryPoints(), and drawInnenContourClosed().


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