86 Geometry(
const PositionVector& shape,
const std::vector<double>& shapeRotations,
const std::vector<double>& shapeLengths);
219 const DottedGeometry& topDottedGeometry,
const bool drawFirstExtrem,
220 const DottedGeometry& botDottedGeometry,
const bool drawLastExtrem);
389 std::vector<Segment>::const_iterator
begin()
const;
392 std::vector<Segment>::const_iterator
end()
const;
435 std::map<const GNELane*, std::pair<GNEGeometry::Geometry, GNEGeometry::DottedGeometry> >
myConnectionsMap;
518 const std::vector<GNEPathElements::PathElement>& path,
531 const std::vector<double>& lengths,
const std::vector<RGBColor>& colors,
double width);
538 const RGBColor& geometryPointColor,
const RGBColor& textColor,
const double radius,
const double exaggeration);
542 const RGBColor& hintColor,
const double radius,
const double exaggeration);
564 const double width,
const double height,
const double offsetX,
const double offsetY,
const double rot,
const double exaggeration);
A class that stores a 2D geometrical boundary.
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
A road/street connecting two junctions (netedit-version)
class for pack all variables related with DottedGeometry color
DottedGeometryColor(const GUIVisualizationSettings &settings)
constructor
const GUIVisualizationSettings & mySettings
pointer to GUIVisualizationSettings
void reset()
rest Dotted Geometry Color
const RGBColor & getFrontColor()
get front color (and change flag)
bool myColorFlag
flag to get color
void changeColor()
change color
const RGBColor & getInspectedColor()
get inspected color (and change flag)
DottedGeometryColor & operator=(const DottedGeometryColor &other)=delete
Invalidated assignment operator.
class for pack all variables related with DottedGeometry
void moveShapeToSide(const double value)
move shape to side
double getWidth() const
get width
double myWidth
geometry width
void updateDottedGeometry(const GUIVisualizationSettings &s, const GNELane *lane)
update DottedGeometry (using lane shape)
void drawFrontDottedGeometry(DottedGeometryColor &dottedGeometryColor) const
draw front inspected dottedShape
void drawInspectedDottedGeometry(DottedGeometryColor &dottedGeometryColor) const
draw inspected dottedShape
DottedGeometry & operator=(const DottedGeometry &other)=delete
Invalidated assignment operator.
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths
std::vector< DottedGeometry::Segment > myDottedGeometrySegments
dotted element shape (note: It's centered in 0,0 due scaling)
DottedGeometry()
constructor
void setWidth(const double width)
change default width
void invertOffset()
invert offset of all segments
class for NETEDIT geometries over lanes
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
Geometry & operator=(const Geometry &other)=delete
Invalidated assignment operator.
void scaleGeometry(const double scale)
scale geometry
std::vector< double > myShapeLengths
The lengths of the shape (note: Always size = myShape.size()-1)
const GNELane * myLane
lane (to use lane geometry)
std::vector< double > myShapeRotations
The rotations of the shape (note: Always size = myShape.size()-1)
PositionVector myShape
element shape
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths
const PositionVector & getShape() const
The shape of the additional element.
const GNEAdditional * myAdditional
additional (to use additional geometry)
void clearGeometry()
clear geometry
void updateGeometry(const PositionVector &shape, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID)
update geometry shape
const std::vector< double > & getShapeLengths() const
The lengths of the single shape parts.
double myRotation
rotation
double getRotation() const
get rotation
const GNELane * getLane() const
get lane
const Position & getPosition() const
get position
ConnectionGeometry()
default constructor
Position myPosition
position
class to pack all variables and functions relative to connections between hierarchical element and th...
void drawConnection(const GUIVisualizationSettings &s, const GNEAttributeCarrier *AC, const double exaggeration) const
draw connections between Parent and childrens
void update()
update Connection's geometry
GNEHierarchicalElement * myHierarchicalElement
pointer to hierarchical element parent
std::vector< ConnectionGeometry > symbolsPositionAndRotation
position and rotation of every symbol over lane
HierarchicalConnections(GNEHierarchicalElement *hierarchicalElement)
constructor
std::vector< GNEGeometry::Geometry > connectionsGeometries
geometry connections between parents an their children
void drawDottedConnection(const DottedContourType type, const GUIVisualizationSettings &s, const double exaggeration) const
draw dotted connections between Parent and childrens
class lane2lane connection geometry
void updateLane2laneConnection()
update
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
Lane2laneConnection & operator=(const Lane2laneConnection &other)=delete
Invalidated assignment operator.
const GNEGeometry::Geometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
const GNEGeometry::DottedGeometry & getLane2laneDottedGeometry(const GNELane *toLane) const
get lane2lane dotted geometry
std::map< const GNELane *, std::pair< GNEGeometry::Geometry, GNEGeometry::DottedGeometry > > myConnectionsMap
connection shape
Lane2laneConnection()
constructor
const GNELane * myFromLane
from lane
struct used for represent segments of element geometry
Segment(const GNELane *lane, const bool valid)
parameter constructor for lanes (geometry will be taked from lane)
const std::vector< double > & getShapeRotations() const
get lane/lane2lane shape rotations
Segment & operator=(const Segment &other)=delete
Invalidated assignment operator.
bool myUseLaneShape
flag to use lane shape
const PositionVector & getShape() const
get lane/lane2lane shape
bool isLaneSegment() const
return true if this is a lane segment (i.e. myNextLane is nullptr)
const GNELane * getLane() const
lane (only for lane segments)
bool getValid() const
valid
Geometry mySegmentGeometry
geometry used in segment
const GNELane * myLane
lane
const std::vector< double > & getShapeLengths() const
get lane/lane2lane shape lengths
const GNEJunction * getJunction() const
junction
void update(const Geometry &geometry)
update segment using geometry
const GNELane * myNextLane
nextLane
struct used for represent segments that must be updated
int getSegmentIndex() const
get segment index
const int mySegmentIndex
segment index
SegmentToUpdate & operator=(const SegmentToUpdate &other)=delete
Invalidated assignment operator.
const GNELane * myNextLane
lane segment (used for updating lane2lane segments)
SegmentToUpdate(const int segmentIndex, const GNELane *lane, const GNELane *nextLane)
constructor
const GNELane * getLane() const
const GNELane * getNextLane() const
get lane segment (used for updating lane2lane segments)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Stores the information about how to visualize structures.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
PositionVector shape
shape
double offset
drawing offset (-1 or 1 only)
std::vector< double > lengths
lengths
Segment()
default constructor
std::vector< double > rotations
rotations
struct for variables used in Geometry extremes
double laneEndPosition
arrival position over lane
Position viewEndPos
end position over view
double laneStartPosition
depart position over lane
Position viewStartPos
start position over view
ExtremeGeometry()
constructor
struct for pack all variables related with geometry of elemements divided in segments
SegmentGeometry & operator=(const SegmentGeometry &other)=delete
Invalidated assignment operator.
void insertCustomSegment(const GNELane *lane, const Geometry &geometry, const bool valid)
insert custom segment
int size() const
number of segments
void updateCustomSegment(const int segmentIndex, const Geometry &geometry)
update custom segment
SegmentGeometry()
constructor
const Segment & back() const
back segment
std::vector< Segment >::const_iterator end() const
end iterator
const Position & getFirstPosition() const
get first position (or Invalid position if segments are empty)
const Position & getLastPosition() const
get first position (or Invalid position if segments are empty)
void updateLane2LaneSegment(const int segmentIndex, const GNELane *lane, const GNELane *nextLane)
update lane2Lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAndL...
void insertLaneSegment(const GNELane *lane, const bool valid)
insert entire lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotationsAn...
std::vector< Segment > myShapeSegments
vector of segments that constitutes the shape
std::vector< Segment >::const_iterator begin() const
begin iterator
double getFirstRotation() const
get first rotation (or Invalid position if segments are empty)
const Segment & front() const
front segment
void clearSegmentGeometry()
clear element geometry
void insertLane2LaneSegment(const GNELane *currentLane, const GNELane *nextLane, const bool valid)
insert entire lane2lane segment (used to avoid unnecessary calculation in calculatePartialShapeRotati...
Boundary getBoxBoundary() const
Returns a boundary enclosing all segments.
static void drawDottedContourClosedShape(const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double exaggeration)
draw dotted contour for the given closed shape (used by Juctions, shapes and TAZs)
static void drawGeometryPoints(const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &geometryPointColor, const RGBColor &textColor, const double radius, const double exaggeration)
draw geometry points
static void drawDottedContourLane(const DottedContourType type, const GUIVisualizationSettings &s, const DottedGeometry &dottedGeometry, const double width, const bool drawFirstExtrem, const bool drawLastExtrem)
draw dotted contour for the given dottedGeometry (used by lanes, routes, etc.)
static double calculateRotation(const Position &first, const Position &second)
return angle between two points (used in geometric calculations)
static void adjustStartPosGeometricPath(double &startPos, const GNELane *startLane, double &endPos, const GNELane *endLane)
adjust start and end positions in geometric path
static void drawDottedContourShape(const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration)
draw dotted contour for the given shape (used by additionals)
static PositionVector getVertexCircleAroundPosition(const Position &pos, const double width, const int steps=8)
get a circle around the given position
static void calculateLaneGeometricPath(GNEGeometry::SegmentGeometry &segmentGeometry, const std::vector< GNEPathElements::PathElement > &path, GNEGeometry::ExtremeGeometry &extremeGeometry)
calculate route between lanes
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
static PositionVector myCircleCoords
Storage for precomputed sin/cos-values describing a circle.
static void updateGeometricPath(GNEGeometry::SegmentGeometry &segmentGeometry, const GNELane *lane, GNEGeometry::ExtremeGeometry &extremeGeometry)
calculate route between edges
static void drawDottedContourEdge(const DottedContourType type, const GUIVisualizationSettings &s, const GNEEdge *edge, const bool drawFrontExtreme, const bool drawBackExtreme)
draw dotted contour for the given dottedGeometries (used by edges)
static void drawSegmentGeometry(const GNEViewNet *viewNet, const SegmentGeometry::Segment &segment, const double width)
draw geometry segment
static void drawGeometry(const GNEViewNet *viewNet, const Geometry &geometry, const double width)
draw geometry
static void drawMovingHint(const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &hintColor, const double radius, const double exaggeration)
draw moving hint
static void drawDottedContourCircle(const DottedContourType type, const GUIVisualizationSettings &s, const Position &pos, const double radius, const double exaggeration)
draw dotted contour for the given Position and radius (used by Juctions and POIs)
static void drawDottedSquaredShape(const DottedContourType type, const GUIVisualizationSettings &s, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double exaggeration)
draw dotted squared contour (used by additionals and demand elements)
static int angleLookup(const double angleDeg)
normalize angle for lookup in myCircleCoords
static double calculateLength(const Position &first, const Position &second)
return length between two points (used in geometric calculations)
static void drawLaneGeometry(const GNEViewNet *viewNet, const PositionVector &shape, const std::vector< double > &rotations, const std::vector< double > &lengths, const std::vector< RGBColor > &colors, double width)
draw lane geometry (use their own function due colors)