![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEContour.h>
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 bool forceCalculation=false) 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 bool forceCalculation=false) 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 double extraZOffset=0) 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. | |
| GNEContour & | operator= (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 | |
| PositionVector * | myCalculatedShape |
| calculated shape | |
| Boundary * | myContourBoundary |
| contourboundary | |
| std::vector< GUIDottedGeometry > * | myDottedGeometries |
| dotted geometries | |
Static Private Attributes | |
| static GUIDottedGeometry::DottedGeometryColor | myDottedGeometryColor |
| dotted geometry color | |
Definition at line 38 of file GNEContour.h.
| GNEContour::GNEContour | ( | ) |
Constructor.
Definition at line 43 of file GNEContour.cpp.
References myCalculatedShape, myContourBoundary, and myDottedGeometries.
Referenced by GNEContour(), and operator=().
| GNEContour::~GNEContour | ( | ) |
destructor
Definition at line 50 of file GNEContour.cpp.
References myCalculatedShape, myContourBoundary, and myDottedGeometries.
|
privatedelete |
Invalidated copy constructor.
References GNEContour().
|
private |
build contour aorund circle
Definition at line 554 of file GNEContour.cpp.
References GUIVisualizationSettings::CircleResolution16, GUIVisualizationSettings::CircleResolution32, GUIGeometry::getVertexCircleAroundPosition(), myCalculatedShape, myContourBoundary, myDottedGeometries, Position::x(), and Position::y().
Referenced by calculateContourCircleShape().
|
private |
build contour around closed shape (ej. polygon)
Definition at line 461 of file GNEContour.cpp.
References myCalculatedShape, myContourBoundary, and myDottedGeometries.
Referenced by calculateContourClosedShape().
|
private |
build contour around edge
Definition at line 584 of file GNEContour.cpp.
References OptionsCont::getBool(), GNEHierarchicalElement::getChildLanes(), GNELane::getDrawingConstants(), GNELane::DrawingConstants::getDrawingWidth(), GNELane::getLaneGeometry(), GNELane::DrawingConstants::getOffset(), OptionsCont::getOptions(), GUIGeometry::getShape(), myCalculatedShape, myContourBoundary, myDottedGeometries, and PositionVector::reverse().
Referenced by calculateContourEdge().
|
private |
build contour between two from-to edgeds
Definition at line 625 of file GNEContour.cpp.
Referenced by calculateContourEdges().
|
private |
build contour around extruded shape (ej. lane)
Definition at line 482 of file GNEContour.cpp.
References myCalculatedShape, myContourBoundary, myDottedGeometries, and PositionVector::reverse().
Referenced by calculateContourExtrudedShape().
|
private |
build contour around rectangle
Definition at line 523 of file GNEContour.cpp.
References DEG2RAD, myCalculatedShape, myContourBoundary, and myDottedGeometries.
Referenced by calculateContourRectangleShape().
| 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 196 of file GNEContour.cpp.
References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.
| 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 |
calculate contour (circle elements)
Definition at line 121 of file GNEContour.cpp.
References buildContourCircle(), GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.
Referenced by GNELaneAreaDetector::drawLanePartialGL().
| 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 74 of file GNEContour.cpp.
References buildContourClosedShape(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.
| 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 135 of file GNEContour.cpp.
References buildContourEdge(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.
Referenced by GNEEdgeData::drawLanePartialGL(), and GNEEdgeRelData::drawLanePartialGL().
| 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 |
calculate contour for edge geometry points
Definition at line 214 of file GNEContour.cpp.
References GUIVisualizationSettings::drawForViewObjectsHandler, NBEdge::getGeometry(), GNEEdge::getNBEdge(), GUIGlObject::getType(), gViewObjectsHandler, Position::INVALID, and myCalculatedShape.
| 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 149 of file GNEContour.cpp.
References buildContourEdges().
Referenced by GNEEdgeRelData::drawJunctionPartialGL().
| 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 |
calculate contour extruded (used in elements formed by a central shape)
Definition at line 90 of file GNEContour.cpp.
References buildContourExtrudedShape(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.
Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().
| 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 bool | forceCalculation = false ) const |
calculate contour for first geometry point
Definition at line 157 of file GNEContour.cpp.
References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.
| 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 bool | forceCalculation = false ) const |
calculate contour for last geometry point
Definition at line 169 of file GNEContour.cpp.
References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.
| 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 |
calculate contour for middle geometry point
Definition at line 181 of file GNEContour.cpp.
References GUIVisualizationSettings::drawForViewObjectsHandler, and gViewObjectsHandler.
| 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 |
calculate contour (for rectangled elements)
Definition at line 107 of file GNEContour.cpp.
References buildContourRectangle(), GUIVisualizationSettings::drawForViewObjectsHandler, gViewObjectsHandler, myCalculatedShape, and myContourBoundary.
| bool GNEContour::checkDrawPathContour | ( | const GUIVisualizationSettings & | s, |
| const GUIVisualizationSettings::Detail | d, | ||
| const GNEAttributeCarrier * | AC ) const |
drawing contour functions
check if draw path contours (if we're inspecting/selecting/deleting a path, we need to draw all path elements)
Definition at line 268 of file GNEContour.cpp.
References GNEAttributeCarrier::checkDrawDeleteContour(), GNEAttributeCarrier::checkDrawDeleteContourSmall(), GNEAttributeCarrier::checkDrawFromContour(), GNEAttributeCarrier::checkDrawFrontContour(), GNEAttributeCarrier::checkDrawInspectContour(), GNEAttributeCarrier::checkDrawMoveContour(), GNEAttributeCarrier::checkDrawOverContour(), GNEAttributeCarrier::checkDrawRelatedContour(), GNEAttributeCarrier::checkDrawSelectContour(), GNEAttributeCarrier::checkDrawToContour(), GUIVisualizationSettings::disableDottedContours, GUIVisualizationSettings::DottedContours, and GUIVisualizationSettings::drawForViewObjectsHandler.
Referenced by GNEEdgeRelData::drawJunctionPartialGL(), GNELaneAreaDetector::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().
| void GNEContour::clearContour | ( | ) | const |
void clear contour
Definition at line 64 of file GNEContour.cpp.
References myCalculatedShape, myContourBoundary, and myDottedGeometries.
| bool GNEContour::drawDottedContour | ( | const GUIVisualizationSettings & | s, |
| GUIDottedGeometry::DottedContourType | type, | ||
| const double | lineWidth, | ||
| const bool | addOffset, | ||
| const double | extraZOffset = 0 ) const |
draw dotted contour (call out of this class only in special cases, for example in WalkingAreas)
Definition at line 442 of file GNEContour.cpp.
References GLO_DOTTEDCONTOUR, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), and GLHelper::pushMatrix().
Referenced by drawDottedContours().
| void GNEContour::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
Definition at line 366 of file GNEContour.cpp.
References GNEAttributeCarrier::checkDrawMoveContour(), GUIVisualizationSettings::disableDottedContours, GUIVisualizationSettings::DottedContours, GNEAttributeCarrier::getGUIGlObject(), GUIGeometry::getVertexCircleAroundPosition(), GLO_DOTTEDCONTOUR, gViewObjectsHandler, Position::INVALID, GUIDottedGeometry::MOVE, myDottedGeometryColor, GLHelper::popMatrix(), and GLHelper::pushMatrix().
| 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 316 of file GNEContour.cpp.
References GNEAttributeCarrier::checkDrawDeleteContour(), GNEAttributeCarrier::checkDrawDeleteContourSmall(), GNEAttributeCarrier::checkDrawFromContour(), GNEAttributeCarrier::checkDrawFrontContour(), GNEAttributeCarrier::checkDrawInspectContour(), GNEAttributeCarrier::checkDrawMoveContour(), GNEAttributeCarrier::checkDrawOverContour(), GNEAttributeCarrier::checkDrawRelatedContour(), GNEAttributeCarrier::checkDrawSelectContour(), GNEAttributeCarrier::checkDrawToContour(), GUIVisualizationSettings::disableDottedContours, GUIVisualizationSettings::DottedContours, GUIVisualizationSettings::dottedContourSettings, drawDottedContour(), GUIDottedGeometry::FROM, GUIDottedGeometry::FRONT, GUIDottedGeometry::INSPECT, GUIDottedGeometry::MOVE, GUIDottedGeometry::OVER, GUIDottedGeometry::RELATED, GUIDottedGeometry::REMOVE, GUIVisualizationDottedContourSettings::segmentWidthSmall, GUIDottedGeometry::SELECT, and GUIDottedGeometry::TO.
Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNEEdgeData::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().
| 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 417 of file GNEContour.cpp.
References myCalculatedShape, myDottedGeometries, myDottedGeometryColor, GLHelper::popMatrix(), and GLHelper::pushMatrix().
| Boundary GNEContour::getContourBoundary | ( | ) | const |
|
privatedelete |
Invalidated assignment operator.
References GNEContour().
|
private |
calculated shape
Definition at line 148 of file GNEContour.h.
Referenced by buildContourCircle(), buildContourClosedShape(), buildContourEdge(), buildContourExtrudedShape(), buildContourRectangle(), calculateContourClosedShape(), calculateContourEdge(), calculateContourEdgeGeometryPoints(), calculateContourExtrudedShape(), calculateContourRectangleShape(), clearContour(), drawInnenContourClosed(), GNEContour(), and ~GNEContour().
|
private |
contourboundary
Definition at line 145 of file GNEContour.h.
Referenced by buildContourCircle(), buildContourClosedShape(), buildContourEdge(), buildContourExtrudedShape(), buildContourRectangle(), calculateContourClosedShape(), calculateContourEdge(), calculateContourExtrudedShape(), calculateContourRectangleShape(), clearContour(), getContourBoundary(), GNEContour(), and ~GNEContour().
|
private |
dotted geometries
Definition at line 142 of file GNEContour.h.
Referenced by buildContourCircle(), buildContourClosedShape(), buildContourEdge(), buildContourExtrudedShape(), buildContourRectangle(), clearContour(), drawDottedContour(), drawInnenContourClosed(), GNEContour(), and ~GNEContour().
|
staticprivate |
dotted geometry color
Definition at line 151 of file GNEContour.h.
Referenced by drawDottedContour(), drawDottedContourGeometryPoints(), and drawInnenContourClosed().