VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
roadSegment.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 #include <vector>
17 #include <list>
18 #include <matrix/vlVector.h>
19 #include <matrix/coordTransform.h>
20 #include <vlpi/appearance.h>
22 #include "vrfutil/railSegment.h"
23 #include <vrfobjcore/simObject.h>
24 
25 class DtRailSegment;
26 class Coordinate_System;
27 class DtRoadSegment;
28 
31 #define DT_ROAD_SEGMENT_NO_LANE -1
32 
34 #define CENTERLINE_EPSILON 0.001
35 
39 {
40 public:
42  virtual ~DtTrafficControlDevice();
44  DtTrafficControlDevice& operator=(const DtTrafficControlDevice& orig);
45  virtual DtTrafficControlDevice* clone();
46 
48  {
57  DtIndicationRed
58  };
59 
62  virtual DtTrafficControlIndication currentIndication() const;
63  virtual DtString indicationString(DtTrafficControlIndication ind) const;
67  virtual void setCurrentIndication(const DtTrafficControlIndication signal);
68 
71  virtual bool isStatic()const;
72  virtual void setIsStatic(const bool isStatic);
74 
77  virtual DtSimObjectReference trafficLightObject();
78  virtual void setTrafficLightObject(DtSimObjectReference trafficLight);
80 
83  virtual double positionAlongLane() const;
84  virtual void setPositionAlongLane(const double p);
85 
86  virtual bool hasRedIndication(const DtAppearance& app) const
87  {
88  return app.powerPlantOn();
89  }
90 
91  virtual bool hasYellowIndication(const DtAppearance& app) const
92  {
93  return app.flamesPresent();
94  }
95 
96  virtual bool hasGreenIndication(const DtAppearance& app) const
97  {
98  return app.smokePlumePresent();
99  }
100 
101 protected:
102 
109 
112 };
113 
114 
116 
121 {
122 public:
123  DtLaneSegment();
124  ~DtLaneSegment();
125  DtLaneSegment(const DtLaneSegment& orig);
126  DtLaneSegment& operator=(const DtLaneSegment& orig);
127  DtLaneSegment* clone();
128 
168  {
176 
186 
190 
195 
202 
207 
212 
213  double myWidth;
214 
215  //Lane line traffic control would go here
216  };
217 
220  DtLaneGeometry& laneGeometry();
221  const DtLaneGeometry& laneGeometry() const;
222 
225  DtTrafficControlDevice* trafficControlDevice();
227  void setTrafficControlDevice(DtTrafficControlDevice* device);
228 
229  //@ Get /set the lane. The right lane is lane 0.
230  int laneNumber()const { return myLaneNumber; }
231  void setLaneNumber(const int lane){ myLaneNumber = lane; }
232 
233  DtRoadSegment* parentRoadSegment() const { return myRoadSegment; }
235  {
236  myRoadSegment = parent;
237  }
238 
243 
251  void generateFirstHalfLanePoints(std::vector<DtVector>& pointList,
252  bool drivingOnLeft,
253  int pointsInCurve = 5);
254 
262  void generateSecondHalfLanePoints(std::vector<DtVector>& pointList,
263  bool drivingOnLeft,
264  int pointsInCurve = 5);
266 
278  int connectingDownstreamLane() const {return myConnectingDownstreamLane;}
279  void setConnectingDownstreamLane(const int lane)
280  {
281  myConnectingDownstreamLane = lane;
282  }
283  int connectingUpstreamLane() const {return myConnectingUpstreamLane;}
284  void setConnectingUpstreamLane(const int lane)
285  {
286  myConnectingUpstreamLane = lane;
287  }
289 
292 
311  double calculateInsideEntryCurveGeometry(double headingChange,
312  double cosHeadingChange, double sinHeadingChange,
313  bool debug = false);
314 
319  void calculateEntryCurveGeometry(double segmentLeftEdgeRadius,
320  double headingChange,
321  bool debug = false);
322 
354  double calculateInsideExitCurveGeometry(double segmentLeftEdgeRadius,
355  double headingChange,
356  double cosHeadingChange, double sinHeadingChange,
357  bool debug = false);
358 
363  void calculateExitCurveGeometry(double segmentLeftEdgeRadius,
364  double headingChange,
365  bool debug = false);
366 
368 
369 protected:
378 
381 
384 
387 
388 };
390 
391 typedef std::list<DtRoadSegment *> DtRoadSegmentList;
392 
396 {
401 };
402 
409 {
410 
411 public:
416  {
417  public:
418  DtTmpGeometry();
419 
432 
443  };
444 
445  DtRoadSegment(const double defaultAltitude = 0.0);
446 
447  virtual ~DtRoadSegment();
448 
449  DtRoadSegment(const DtRoadSegment& orig);
450  DtRoadSegment& operator=(const DtRoadSegment& orig);
451  virtual DtRoadSegment* clone();
452 
456 
466  virtual bool initializeFromRailSegment(DtRailSegment* railSegment,
467  const Coordinate_System* localCoordinateSystem, bool isDrivingOnLeft,
468  DtRoadSegment* opposingSegment, bool debug = false);
469 
497  virtual bool calculateTemporaryExitGeometry(const double maxSmallBendRadius,
498  const double vehicleWidth, const double headingChange,
499  const double cosHeadingChange, const double sinHeadingChange,
500  bool debug);
501 
514  virtual bool calculateTemporaryEntryGeometry(const double headingChange,
515  const double cosHeadingChange, const double sinHeadingChange,
516  bool debug);
517 
537  virtual bool initializeExitCurve(
538  const double maxSmallBendTurnRadius, const double vehicleWidth,
539  const double headingChange,
540  const double cosHeadingChange, const double sinHeadingChange,
541  bool debug = false);
542 
558  virtual bool initializeEntryCurve(const double headingChange,
559  const double cosHeadingChange, const double sinHeadingChange,
560  bool debug = false);
561 
568  virtual void setExitCurvesForEndingLanes();
569 
589  virtual void connectWithNext(DtRoadSegment* nextSegment,
590  bool isDrivingOnLeft,
591  bool debug,
592  bool fillOpposingSegment = true);
593 
600  virtual void connectWithNextConsideringBreakdownLane(DtRoadSegment* nextSegment,
601  bool isDrivingOnLeft,
602  bool debug,
603  bool fillOpposingSegment,
604  bool useBreakdownLane);
605 
613  virtual void determineIfIntersectionApproach(const DtRoadSegment* next);
614 
629  virtual bool computeSegmentToLocalTransform(
630  const DtRoadSegment* previous, const DtAttachedTerrain* terrain,
631  const bool isDriveOnLeft, const bool debug = false);
632 
638  virtual bool allAltitudesDetermined() const { return myAllAltitudesDetermined; }
639  virtual void setAllAltitudesDetermined(const bool b)
640  {
641  myAllAltitudesDetermined = b;
642  }
643 
646  virtual double defaultAltitude() const {
647  return myDefaultAltitude;
648  };
649  virtual void setDefaultAltitude(const double altitude)
650  {
651  myDefaultAltitude = altitude;
652  }
653 
655 
656  //---------------------
657 
662 
665  virtual DtRoadSegmentPart segmentPart(const int laneN,
666  const double positionAlongLane);
667 
670  virtual double distanceFromLaneEnd(const int laneN,
671  const double positionAlongLane);
672 
675  virtual double evenPositionAlongLane(const double positionAlongLaneA,
676  const int laneA, const int laneB);
677 
698  virtual bool localPositionFromLanePosition(const int laneN,
699  const double positionAlongLane, const double lateralOffset, bool isDrivingOnLeft,
700  DtVector& localPosition, double& headingOffset,
701  double& distanceBeyond) const;
702 
708  virtual bool lanePositionFromLocalPosition(const DtVector localPosition,
709  const int laneN, bool isDrivingOnLeft,
710  double &positionInLane, double& laneOffset,
711  bool debug) const;
713 
714  //---------------------------
715 
720 
725  virtual int rightmostContinuingLane() const;
726 
727 
729  virtual int rightmostContinuingTravelLane(bool bAllowingBreakdownLane=false) const;
730 
741  virtual int findNearestContinuingLane(const int laneN,
742  const double positionAlongLane, const double lookAheadDistance, bool debug = false);
743 
753  virtual bool laneContinuesForDistance(const int laneN,
754  const double positionAlongLane, const double lookDistance,
755  double & actualDistance, bool & pathContinues, bool debug = false);
756 
763  virtual int matchingLane(const double offset);
764 
766 
769 
770  virtual double heading() const {return myHeading;}
771  virtual void setHeading(const double h) {myHeading = h;}
772 
777  virtual double length() const {return myLength;}
778  virtual void setLength(const double l){myLength = l;}
779 
782  virtual double medianWidth() const { return myMedianWidth; }
783  virtual void setMedianWidth(const double w) { myMedianWidth = w; }
784 
786  virtual DtString roadName() const { return myRoadName; }
787  virtual void setRoadName(const DtString& name) { myRoadName = name; }
788 
794  virtual const DtCoordTransform& segmentToLocalTransform() const {return mySegmentToLocal;}
795  virtual void setSegmentToLocalTransform(const DtCoordTransform& xform)
796  {
797  mySegmentToLocal = xform;
798  }
799 
800  virtual int numLanes() const {return myNumberLanes;}
801  virtual void setNumLanes(const int nLanes) {myNumberLanes = nLanes;}
802 
807  virtual DtLaneSegment* lanes() {return myLanes;}
808  virtual const DtLaneSegment* lanes() const { return myLanes;}
809 
810  virtual bool isOneWay() const {return myIsOneWay;}
811  virtual void setIsOneWay(const bool oneWay) {myIsOneWay = oneWay;}
812 
813  virtual bool exitIsRightTurn() const {return myExitBendsRight;}
814  virtual void setExitIsRightTurn(const bool r) {myExitBendsRight = r;}
815 
822  virtual bool entryIsRightTurn() const {return myEntryBendsRight;}
823  virtual void setEntryIsRightTurn(const bool r) {myEntryBendsRight = r;}
824 
825  virtual double entryCurveEndOffset() const {return myEntryCurveEndOffset;}
826  virtual void setEntryCurveEndOffset(const double o){myEntryCurveEndOffset = o;}
827 
828  virtual double exitCurveStartOffset() const {return myExitCurveStartOffset;}
829  virtual void setExitCurveStartOffset(const double o){myExitCurveStartOffset = o;}
830 
831  virtual bool isIntersectionApproach() const {return myIsIntersectionApproach;}
832  virtual void setIsIntersectionApproach(const bool i) {myIsIntersectionApproach = i;}
833 
834  virtual bool isModerateExitTurn() const { return myIsModerateExitTurn; }
835  virtual void setIsModerateExitTurn(bool bYes) { myIsModerateExitTurn = true; }
836 
837  virtual double stopLineSetBack() const {return myStopLineSetback;}
838  virtual void setStopLineSetBack(const double sb) {myStopLineSetback = sb;}
839 
840  virtual double speedLimit() const {return mySpeedLimit;}
841  virtual void setSpeedLimit(const double limit) {mySpeedLimit = limit;}
842 
848  virtual double defaultSpeedLimit(const int numLanes);
849 
850  virtual double freeFlowSpeed() const { return myFreeFlowSpeed; }
851  virtual void setFreeFlowSpeed(const double ff) {myFreeFlowSpeed = ff;}
852 
853  virtual DtRoadSegment* nextRoadSegment()const {return myNextSegment;}
854  virtual void setNextRoadSegment(DtRoadSegment* s) {myNextSegment = s;}
855 
856  virtual DtRoadSegment* previousRoadSegment() const {return myPreviousSegment;}
858  DtRoadSegment* s) {myPreviousSegment = s;}
859 
860  virtual DtRoadSegment* opposingSegment() const {return myOpposingSegment;}
862  {
863  myOpposingSegment = s;
864  }
865 
866  virtual bool isOpposing() const {return myIsOpposing;}
867  virtual void setIsOpposing(const bool opposing) {myIsOpposing = opposing;}
868 
874  virtual DtTmpGeometry* temporaryGeometry() ;
875 
877 
878 
879 
880 protected:
885  virtual void findRightMostAlignedLane(DtRoadSegment* nextSegment,
886  int& rightMostLane, int& nextSegmentRightMostLane,
887  int& numAlignedLanes);
888 
893  virtual void findLeftMostAlignedLane(DtRoadSegment* nextSegment,
894  int& leftMostLane, int& nextSegmentLeftMostLane,
895  int& numAlignedLanes);
896 
897  //------------------------------------------------------------------------
898 
899 public:
900 
907 
919  virtual double minIntersectionBendAngle(){ return 0.7854; }
920 
935  virtual double intrxThresholdAngleToConnectEdgeLanes(){ return 0.3; }
936 
948  virtual double intrxThresholdAngleToConnectAllLanes() { return 0.2; }
949 
961  virtual double nonIntrxThresholdAngleToConnectEdgeLanes(){ return 0.7854; }
962 
966  virtual double minimumLaneWidth(){ return 2.0; }
968 
969  //------------------------------------------------------------------------
970 
971 protected:
972 
974  double myLength;
975 
980  DtCoordTransform mySegmentToLocal;
981 
984 
985  double myHeading;
987  double myNextHeading;
992 
1000 
1012 
1019 
1025 
1029 
1032 
1037 
1040 
1043 
1048 
1056 
1061 };
1062 
double myExitCurveStartOffset
Similarly, where the exit curve starts, relative to the end of the segment.
Definition: roadSegment.h:999
virtual bool isIntersectionApproach() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:831
virtual double freeFlowSpeed() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:850
virtual bool isOpposing() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:866
virtual void setExitCurveStartOffset(const double o)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:829
virtual double minIntersectionBendAngle()
This defines how much of an angle between segments is required for the connection to be considered an...
Definition: roadSegment.h:919
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual void setAllAltitudesDetermined(const bool b)
Fills in values for lane width, number of lanes, median width, and so forth from the rail segment...
Definition: roadSegment.h:639
virtual double stopLineSetBack() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:837
DtSimObjectReference myTrafficLight
If and only if the TCD is not static, then consult this for indication:
Definition: roadSegment.h:107
double myDesiredLeftEdgeEntryRadius
Desired R for the segment left edge. R for the inside lane is computed from this by adding/subtractin...
Definition: roadSegment.h:431
int connectingUpstreamLane() const
Definition: roadSegment.h:283
bool myEntryBendsRight
Refers to the connection from the upstream segment:
Definition: roadSegment.h:991
DtRoadSegment * myOpposingSegment
Only valid if not a one-way segment.
Definition: roadSegment.h:1010
This class is used to interface with the terrain a particular entity is &quot;attached&quot; to...
Definition: attachedTerrain.h:57
virtual double intrxThresholdAngleToConnectAllLanes()
This defines a threshold between segments at an intersection that determines whether all aligned lane...
Definition: roadSegment.h:948
int myConnectingUpstreamLane
Upstream connecting lane.
Definition: roadSegment.h:380
void setConnectingDownstreamLane(const int lane)
Definition: roadSegment.h:279
virtual void setRoadName(const DtString &name)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:787
virtual bool isModerateExitTurn() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:834
virtual double speedLimit() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:840
virtual double minimumLaneWidth()
The minimum lane width expected from the feature data. Default value 2.0.
Definition: roadSegment.h:966
virtual void setStopLineSetBack(const double sb)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:838
DtTrafficControlIndication myTrafficControlIndication
Definition: roadSegment.h:105
double myLength
The length of the underlying road feature, ie the rail segment.
Definition: roadSegment.h:974
virtual void setIsModerateExitTurn(bool bYes)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:835
virtual const DtLaneSegment * lanes() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:808
Definition: roadSegment.h:400
virtual bool hasRedIndication(const DtAppearance &app) const
Definition: roadSegment.h:86
Definition: roadSegment.h:398
bool myAllAltitudesDetermined
Definition: roadSegment.h:982
double myDefaultAltitude
Definition: roadSegment.h:983
virtual void setIsOpposing(const bool opposing)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:867
double myStraightSectionLength
This is the length of the straight section between the entry and exit curves. If this road segment an...
Definition: roadSegment.h:201
double myExitCurveLength
This offset is normally negative, meaning that the curve starts before the end of the segment...
Definition: roadSegment.h:206
virtual double entryCurveEndOffset() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:825
virtual int numLanes() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:800
virtual void setOpposingSegment(DtRoadSegment *s)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:861
virtual bool hasYellowIndication(const DtAppearance &app) const
Definition: roadSegment.h:91
double myMinExitCurveSpace
Ditto for exit curve. Note that offset (or setback) is positive along the positive segment X coordina...
Definition: roadSegment.h:440
double myExitCurveStartOffset
This offset is normally negative, meaning that the curve starts before the end of the segment...
Definition: roadSegment.h:210
virtual void setLength(const double l)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:778
double mySpeedLimit
If available; 0 indicates not set.
Definition: roadSegment.h:1031
virtual DtLaneSegment * lanes()
Lanes is a vector of DtLaneSegment objects, with lane 0 the right-most, and lane myNumberLanes-1 the ...
Definition: roadSegment.h:807
Definition: roadSegment.h:51
DtRailSegment are segments entities can follow when using the rail movement system.
Definition: railSegment.h:20
virtual const DtCoordTransform & segmentToLocalTransform() const
Converts from a road-segment coordinate system to local database coordinates. The road segment coordi...
Definition: roadSegment.h:794
int laneNumber() const
Definition: roadSegment.h:230
double myDesiredExitCurveSpace
Ditto for exit curve. Note that offset (or setback) is positive along the positive segment X coordina...
Definition: roadSegment.h:439
int myNumberLanes
Definition: roadSegment.h:1013
double myExitCurveRadius
This offset is normally negative, meaning that the curve starts before the end of the segment...
Definition: roadSegment.h:205
double myExitLaneIntersectSetback
Ditto for exit curve. Note that offset (or setback) is positive along the positive segment X coordina...
Definition: roadSegment.h:438
int myConnectingDownstreamLane
What lane this connects to in the downstream segment. RoadSegment lanes, ie 0-based numbering...
Definition: roadSegment.h:377
int myExitInsideLaneNum
Ditto for exit curve. Note that offset (or setback) is positive along the positive segment X coordina...
Definition: roadSegment.h:437
virtual double length() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:777
int myEntryInsideLaneNum
The inside lane that connects, ie generates the radius constraint.
Definition: roadSegment.h:421
void setParentRoadSegment(DtRoadSegment *parent)
Definition: roadSegment.h:234
virtual void setNextRoadSegment(DtRoadSegment *s)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:854
DtTrafficControlIndication
Definition: roadSegment.h:47
std::list< DtRoadSegment * > DtRoadSegmentList
Definition: roadSegment.h:391
virtual void setEntryCurveEndOffset(const double o)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:826
double myEntryCurveRadius
This is the length of the arc from the midpoint of the turn to where it joins the straight part of th...
Definition: roadSegment.h:185
virtual void setNumLanes(const int nLanes)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:801
A class to hold the initially computed geometry for the inside lane of each segment in the path; used...
Definition: roadSegment.h:415
bool myIsOpposing
Indicates that this segment goes in the opposite direction of the related rail segment. The opposing segments are filled out in the current implementation (4.5), but are not used.
Definition: roadSegment.h:1047
bool myIsModerateExitTurn
This indicates a turn into next segment that exceeds intrxThresholdAngleToConnectEdgeLanes(). In other words, hard turn left or right.
Definition: roadSegment.h:1060
virtual double defaultAltitude() const
The default altitude is what is assumed for the segment before the altitude lookups from the terrain ...
Definition: roadSegment.h:646
double myMedianWidth
The width of the median in this (2-way) segment.
Definition: roadSegment.h:1039
double myNextHeading
The segment downstream:
Definition: roadSegment.h:987
virtual void setPreviousRoadSegment(DtRoadSegment *s)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:857
virtual double exitCurveStartOffset() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:828
double myPositionAlongLane
Definition: roadSegment.h:108
Definition: coordSystem.h:54
virtual double medianWidth() const
Width of the median. Only applies to 2-way segments. The lanes are offset half this width from the se...
Definition: roadSegment.h:782
double myStopLineSetback
Distance before end of straight segment where stop line is located. (Note: in VRF 4...
Definition: roadSegment.h:1028
virtual void setSpeedLimit(const double limit)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:841
DtRoadSegment * myNextSegment
These come directly from the rail path, thus there is a connection to only on other road segment befo...
Definition: roadSegment.h:1007
virtual void setMedianWidth(const double w)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:783
virtual DtString roadName() const
Name of the road containing this segment.
Definition: roadSegment.h:786
virtual bool entryIsRightTurn() const
Indicates a positive heading change from the previous segment to this one, and that lanes to the righ...
Definition: roadSegment.h:822
virtual DtRoadSegment * opposingSegment() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:860
bool myIsOneWay
These come directly from the rail path, thus there is a connection to only on other road segment befo...
Definition: roadSegment.h:1008
DtLaneGeometry myGeometry
Definition: roadSegment.h:370
double myWidth
Definition: roadSegment.h:213
virtual double intrxThresholdAngleToConnectEdgeLanes()
This defines a threshold between segments at an intersection that determines how lanes are connected...
Definition: roadSegment.h:935
virtual bool exitIsRightTurn() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:813
double myEntryLaneIntersectSetback
The offset (along the lane centerline) from the start of the segment to the intersection with the con...
Definition: roadSegment.h:424
virtual DtRoadSegment * nextRoadSegment() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:853
virtual void setIsOneWay(const bool oneWay)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:811
Description of one lane of a DtRoadSegment. Note: Because of the pointer arithmetic of this class wit...
Definition: roadSegment.h:120
Definition: roadSegment.h:399
virtual void setFreeFlowSpeed(const double ff)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:851
virtual bool allAltitudesDetermined() const
This indicates that the altitude lookups needed to make the mySegmentToLocal transform (start and end...
Definition: roadSegment.h:638
double myEntryCurveEndOffset
The offset in X from the segment origin to the end of the entry arc; marks the beginning of the strai...
Definition: roadSegment.h:193
double myLaneOffsetDistance
This is the lateral offset (in y) from the segment origin to the centerline of this lane...
Definition: roadSegment.h:175
double myMinEntryCurveSpace
Distance from lane intersection to the end of a curve of min radius.
Definition: roadSegment.h:428
void setLaneNumber(const int lane)
Definition: roadSegment.h:231
virtual void setExitIsRightTurn(const bool r)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:814
virtual bool isOneWay() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:810
DtTrafficControlDevice * myTrafficSignal
Not currently used (future work); the traffic control device controlling traffic flow in the lane of ...
Definition: roadSegment.h:374
DtTmpGeometry myTmpGeometry
This information is used when constructing the road path to find modifications to the segments when t...
Definition: roadSegment.h:1055
DtRoadSegmentPart
This enumeration is a convenience for indicating what part of the lane geometry a point is on...
Definition: roadSegment.h:395
DtRoadSegment * myRoadSegment
The road segment this lane belongs to.
Definition: roadSegment.h:383
double myEntryCurveEndOffset
TODO – the following two members aren&#39;t used. See comment above. Where the entry curve ends and the s...
Definition: roadSegment.h:996
Definition: roadSegment.h:50
Definition: roadSegment.h:53
bool myIsStatic
True for fixed indications–none, Stop, Yield, blinkers.
Definition: roadSegment.h:104
virtual DtRoadSegment * previousRoadSegment() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:856
A traffic control device for intersection flow, ie stop and yield signs, traffic lights, etc. Used for DtLaneSegment in DtRoadSegment.
Definition: roadSegment.h:38
DtString myRoadName
The name of the road.
Definition: roadSegment.h:1042
virtual double heading() const
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:770
The geometry of the lane, especially the parameters of the circular arcs that define the entry and ex...
Definition: roadSegment.h:167
double myDesiredEntryCurveSpace
Distance from lane intersection to the end of the curve of desired radius.
Definition: roadSegment.h:426
Description of one segment of a road.
Definition: roadSegment.h:408
double myFreeFlowSpeed
This is the speed traffic flows on average, irrespective of the legal speed limit above...
Definition: roadSegment.h:1036
virtual void setDefaultAltitude(const double altitude)
Fills in values for lane width, number of lanes, median width, and so forth from the rail segment...
Definition: roadSegment.h:649
Definition: roadSegment.h:55
DtPlatformSimObjectFacade myPlatformSimObjectFacade
Member to allow for access to platform specific data.
Definition: roadSegment.h:111
DtLaneSegment * myLanes
A vector of lanes, with lane 0 the right-most, and lane myNumberLanes-1 the left-most (or vice versa ...
Definition: roadSegment.h:1018
Definition: roadSegment.h:397
virtual void setHeading(const double h)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:771
virtual void setIsIntersectionApproach(const bool i)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:832
double myDesiredLeftEdgeExitRadius
Ditto for exit curve. Note that offset (or setback) is positive along the positive segment X coordina...
Definition: roadSegment.h:441
bool myExitBendsRight
Refers to the connection to the downstream segment:
Definition: roadSegment.h:989
int myLaneNumber
The array index of this lane in the road segment&#39;s array of lanes.
Definition: roadSegment.h:386
virtual void setEntryIsRightTurn(const bool r)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:823
DtRoadSegment * parentRoadSegment() const
Definition: roadSegment.h:233
voidpf uLong offset
Definition: ioapi.h:42
void setConnectingUpstreamLane(const int lane)
Definition: roadSegment.h:284
DtCoordTransform mySegmentToLocal
Coordinate transformation from segment coordinates to local database coordinates. Segment coordinates...
Definition: roadSegment.h:980
DtRoadSegment * myPreviousSegment
These come directly from the rail path, thus there is a connection to only on other road segment befo...
Definition: roadSegment.h:1006
virtual bool hasGreenIndication(const DtAppearance &app) const
Definition: roadSegment.h:96
double myHeading
Definition: roadSegment.h:985
int connectingDownstreamLane() const
Definition: roadSegment.h:278
bool myIsIntersectionApproach
Indicates that the connection at the downstream end is an intersection. Set in determineIfIntersectio...
Definition: roadSegment.h:1024
virtual double nonIntrxThresholdAngleToConnectEdgeLanes()
Same as above, but for segments that define a bend in a through street rather than an intersection...
Definition: roadSegment.h:961
Definition: roadSegment.h:49
virtual void setSegmentToLocalTransform(const DtCoordTransform &xform)
This is the length of the associated rail segment. This is the same as the length of the straight par...
Definition: roadSegment.h:795
double myEntryCurveLength
This is the length of the arc from the midpoint of the turn to where it joins the straight part of th...
Definition: roadSegment.h:189

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)