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 
147  //------------ Traffic Control Devices ---------------
148 
151  virtual DtEntityType trafficLightType() const
152  {
153  DtEntityType trafficLight(5, 1, 0, 6, 4, 0, 1);
154  return trafficLight;
155  }
156 
159  virtual double trafficLightFacingOffset()
160  {
161  return 0.0;
162  }
163 
166  virtual DtEntityType stopSignType() const
167  {
168  DtEntityType stopSign(5, 1, 0, 6, 9, 0, 13);
169  return stopSign;
170  }
171 
174  virtual double stopSignFacingOffset()
175  {
176  return M_PI;
177  }
178 
180  virtual DtEntityType stopLineType() const
181  {
182  DtEntityType stopLine(17, 0, 0, 1, 0, 0, 1);
183  return stopLine;
184  }
185 
187  virtual void intersectionControlObjectTypes(std::vector<DtEntityType> &tcdTypes);
188 
191  virtual bool isIntersectionControlDevice(const DtEntityType& objType);
192 
193 
194 protected:
198 };
#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:174
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:197
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:389
Definition: coordSystem.h:54
virtual DtEntityType trafficLightType() const
Indicates whether the given object type is a traffic light.
Definition: roadPathFunctions.h:151
virtual DtEntityType stopLineType() const
Provides the type of a stop line object.
Definition: roadPathFunctions.h:180
virtual double trafficLightFacingOffset()
This is the offset of the facing of a light from its entity heading.
Definition: roadPathFunctions.h:159
Description of one segment of a road.
Definition: roadSegment.h:406
virtual DtEntityType stopSignType() const
Indicates whether the given object type is a stop sign.
Definition: roadPathFunctions.h:166

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)