VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
roadPathFunctions.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
13 #include "vrfmodel/roadSegment.h"
14 #include "vrfutil/railSegment.h"
16 
17 class Coordinate_System;
18 
20 {
21 public:
23 
25 
26 public:
31  virtual bool setupRoadFromRailPath(const DtRailSegmentList& railPath,
32  const Coordinate_System* localCoordinateSystem,
33  bool drivingOnLeft,
34  DtRoadSegmentList& roadPath,
35  const bool debug = false);
36 
56  virtual bool getRoadPathAltitudes(DtRoadSegmentList& roadPath,
57  const DtAttachedTerrain* terrain,
58  bool &allTerrainAvailable, bool debug = false);
59 
62  virtual bool generatePathCenterlinePoints(
63  const DtRoadSegmentList& roadPath, bool drivingOnLeft,
64  std::vector<DtVector> & pointList,
65  std::map<DtRoadSegment*, unsigned>& segmentToPointsMap);
66 
73  virtual void findIntersectionControlAlongPath(
74  DtRoadSegmentList& roadPath, bool drivingOnLeft, bool debug);
75 
76 
77 protected:
78 
83  virtual bool makeRoadPathListFromRailPath(const DtRailSegmentList& railPath,
84  DtRoadSegmentList& roadPath, const Coordinate_System* localCoordinateSystem, bool isDrivingOnLeft,
85  int& roadSegNum, bool debug);
86 
94  virtual void connectSegmentLanes(const DtRoadSegmentList& roadPath,
95  bool drivingOnLeft, bool debug);
96 
108  virtual void calculatePathTemporaryGeometry(DtRoadSegmentList& roadPath,
109  bool isDrivingOnLeft, double maxSmallBendTurnRadius, bool debug);
110 
116  virtual void reconnectRoadSegments(DtRoadSegment* prevRoadSegment,
117  DtRoadSegment* nextRoadSegment,
118  const bool isDrivingOnLeft,
119  const double maxSmallBendTurnRadius,
120  const bool debug);
121 
128  virtual bool adjustShortSegmentsInCurve(DtRoadSegmentList& roadPath,
129  const bool isDrivingOnLeft, const Coordinate_System* localCoordinateSystem,
130  const double maxSmallBendTurnRadius, const bool debug);
131 
138  virtual bool adjustShortSegmentInS(DtRoadSegmentList& roadPath,
139  bool isDrivingOnLeft, const Coordinate_System* localCoordinateSystem,
140  double maxSmallBendTurnRadius, bool debug);
141 
144  virtual void calculateCurvesBetweenSegments(DtRoadSegmentList& roadPath,
145  bool isDrivingOnLeft, double maxSmallBendTurnRadius, bool debug);
146 
149  virtual void adjustPathStartForShortSegment(DtRoadSegmentList& roadPath, bool debug);
150 
151  //------------ Traffic Control Devices ---------------
152 
155  virtual DtEntityType trafficLightType() const
156  {
157  DtEntityType trafficLight(5, 1, 0, 6, 4, 0, 1);
158  return trafficLight;
159  }
160 
163  virtual double trafficLightFacingOffset()
164  {
165  return 0.0;
166  }
167 
170  virtual DtEntityType stopSignType() const
171  {
172  DtEntityType stopSign(5, 1, 0, 6, 9, 0, 13);
173  return stopSign;
174  }
175 
178  virtual double stopSignFacingOffset()
179  {
180  return M_PI;
181  }
182 
184  virtual DtEntityType stopLineType() const
185  {
186  DtEntityType stopLine(17, 0, 0, 1, 0, 0, 1);
187  return stopLine;
188  }
189 
191  virtual void intersectionControlObjectTypes(std::vector<DtEntityType> &tcdTypes);
192 
195  virtual bool isIntersectionControlDevice(const DtEntityType& objType);
196 
197 
198 protected:
202 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
This class is used to interface with the terrain a particular entity is &quot;attached&quot; to...
Definition: attachedTerrain.h:57
virtual double stopSignFacingOffset()
This is the offset of the facing of a sign from its entity heading.
Definition: roadPathFunctions.h:178
std::list< DtRailSegment * > DtRailSegmentList
Definition: railSegment.h:194
DtRoadMovementController * myController
This member is made available so that this class can refer to controller data including the descripto...
Definition: roadPathFunctions.h:201
Definition: roadPathFunctions.h:19
DtRoadMovementController is a movement controller that models an entity&#39;s movement along a road path...
Definition: roadMovementController.h:65
std::list< DtRoadSegment * > DtRoadSegmentList
Definition: roadSegment.h:391
Definition: coordSystem.h:54
virtual DtEntityType trafficLightType() const
Indicates whether the given object type is a traffic light.
Definition: roadPathFunctions.h:155
virtual DtEntityType stopLineType() const
Provides the type of a stop line object.
Definition: roadPathFunctions.h:184
virtual double trafficLightFacingOffset()
This is the offset of the facing of a light from its entity heading.
Definition: roadPathFunctions.h:163
Description of one segment of a road.
Definition: roadSegment.h:408
virtual DtEntityType stopSignType() const
Indicates whether the given object type is a stop sign.
Definition: roadPathFunctions.h:170

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)