Public Member Functions |
| | DtRoadPathFunctions (DtRoadMovementController *parentController) |
| | ~DtRoadPathFunctions () |
| virtual bool | setupRoadFromRailPath (const DtRailSegmentList &railPath, const Coordinate_System *localCoordinateSystem, bool drivingOnLeft, DtRoadSegmentList &roadPath, const bool debug=false) |
| | Generate a road path from the rail path, including computing the geometry of the curves connecting lane centerlines in adjacent segments.
|
| virtual bool | getRoadPathAltitudes (DtRoadSegmentList &roadPath, const DtAttachedTerrain *terrain, bool &allTerrainAvailable, bool debug=false) |
| | Compute the coordinate transform from road segment to local coordinates, as well as the side slope at the beginning and end of the segment.
|
| virtual bool | generatePathCenterlinePoints (const DtRoadSegmentList &roadPath, bool drivingOnLeft, std::vector< DtVector > &pointList) |
| | Generate a vector of points that indicate the road path.
|
Protected Member Functions |
| virtual bool | makeRoadPathListFromRailPath (const DtRailSegmentList &railPath, DtRoadSegmentList &roadPath, const Coordinate_System *localCoordinateSystem, int &roadSegNum, bool debug) |
| virtual void | connectSegmentLanes (const DtRoadSegmentList &roadPath, bool drivingOnLeft, bool debug) |
| | Fill in the upstream and downstream lane numbers for all of the lanes in each segment.
|
| virtual void | calculatePathTemporaryGeometry (DtRoadSegmentList &roadPath, bool isDrivingOnLeft, double maxSmallBendTurnRadius, bool debug) |
| | Calculates the radius and desired setback of the curves connecting the road segments.
|
| virtual void | reconnectRoadSegments (DtRoadSegment *prevRoadSegment, DtRoadSegment *nextRoadSegment, const bool isDrivingOnLeft, const double maxSmallBendTurnRadius, const bool debug) |
| | This function is run to connect two road segments that have already been initialized.
|
| virtual bool | adjustShortSegmentsInCurve (DtRoadSegmentList &roadPath, const bool isDrivingOnLeft, const Coordinate_System *localCoordinateSystem, const double maxSmallBendTurnRadius, const bool debug) |
| | Looks for segments that are too short for a minimum-radius entry and and exit curve, and that have entry and exit heading changes in the same direction (i.e.
|
| virtual bool | adjustShortSegmentInS (DtRoadSegmentList &roadPath, bool isDrivingOnLeft, const Coordinate_System *localCoordinateSystem, double maxSmallBendTurnRadius, bool debug) |
| | Looks for segments that are too short for a minimum-radius entry and and exit curve, and that have entry and exit heading changes in different directions (i.e., the path makes a small S at this segment).
|
| virtual void | calculateCurvesBetweenSegments (DtRoadSegmentList &roadPath, bool isDrivingOnLeft, double maxSmallBendTurnRadius, bool debug) |
| | Calculates the curves connecting segments– calculates the radius and how far from the end of the straight road feature the curve must start.
|
Constructor & Destructor Documentation
| DtRoadPathFunctions::~DtRoadPathFunctions |
( |
| ) |
|
Member Function Documentation
Generate a road path from the rail path, including computing the geometry of the curves connecting lane centerlines in adjacent segments.
If drivingOnLeft is true, then a mirror image geometry will be set up. Return true if successful.
Compute the coordinate transform from road segment to local coordinates, as well as the side slope at the beginning and end of the segment.
These values will be used to compute positions in local coordinates of locations on the segment. Fills in value of mySegmentToLocal.
The function loops through all of the segments, and for each that does have myAllAltitudesDetermined == true, it generates the xy location of points in the left and right lanes at the beginning and end of the segment and looks up altitude for them. If (and only if) all altitude data is available, it sets the segment coordinate transform and sets myAllAltitudesDetermined to true.
- Parameters
-
| roadPath | is the road path whose segment-to-local coordinate transform and edge altitudes are being set. This path must match the rail path above. |
| terrain | is the terrain the entity is attached to. |
| terrainAvailable | a flag that indicates if the elevations were all found, vs. at least one terrain call returning "not available." |
- Returns
- False if there was an error, other than terrain not available. True if no error, although possibly terrain might not have been available. In this case the transform is not computed for those segments.
Generate a vector of points that indicate the road path.
This is used for visualization.
Fill in the upstream and downstream lane numbers for all of the lanes in each segment.
Depending on segment geometry, all of the lanes may be connected, or only one. If the road bends enough where the segments join, then only the inner lane will connect. This function accounts for alignment offsets where one-way segments meet two-way segments too.
| virtual void DtRoadPathFunctions::calculatePathTemporaryGeometry |
( |
DtRoadSegmentList & |
roadPath, |
|
|
bool |
isDrivingOnLeft, |
|
|
double |
maxSmallBendTurnRadius, |
|
|
bool |
debug |
|
) |
| |
|
protectedvirtual |
Calculates the radius and desired setback of the curves connecting the road segments.
These will be used to determine if the segments are long enough. If not, the segments will be adjusted, and the curve geometries will be recomputed afterwards.
| virtual void DtRoadPathFunctions::reconnectRoadSegments |
( |
DtRoadSegment * |
prevRoadSegment, |
|
|
DtRoadSegment * |
nextRoadSegment, |
|
|
const bool |
isDrivingOnLeft, |
|
|
const double |
maxSmallBendTurnRadius, |
|
|
const bool |
debug |
|
) |
| |
|
protectedvirtual |
This function is run to connect two road segments that have already been initialized.
It calls DtRoadSegment::connectWithNext, and DtRoadSegment::calculateTemporaryExit(and Entry)Geometry.
Looks for segments that are too short for a minimum-radius entry and and exit curve, and that have entry and exit heading changes in the same direction (i.e.
are part of a curve). Attempts to improve the path by lengthening or removing such segments.
- Returns
- true when no short curve segments are found in the path.
Looks for segments that are too short for a minimum-radius entry and and exit curve, and that have entry and exit heading changes in different directions (i.e., the path makes a small S at this segment).
Attempts to improve the path by lengthening or removing such segments.
- Returns
- true when no short S segments are found in the path.
| virtual void DtRoadPathFunctions::calculateCurvesBetweenSegments |
( |
DtRoadSegmentList & |
roadPath, |
|
|
bool |
isDrivingOnLeft, |
|
|
double |
maxSmallBendTurnRadius, |
|
|
bool |
debug |
|
) |
| |
|
protectedvirtual |
Calculates the curves connecting segments– calculates the radius and how far from the end of the straight road feature the curve must start.
Member Data Documentation
This member is made available so that this class can refer to controller data including the descriptor.
The documentation for this class was generated from the following file: