![]() |
VR-Forces Developer's Guide
|
DtRailSegment are segments entities can follow when using the rail movement system.
End User Description: DtRailSegments are segments with attributes that entities follow. Currently these are only generated by the DtRailPathPlanner however future components can generate them if they desire an entity to follow along a collections of segments with defined speeds and heading. Other attributes can be added that can affect how an entity moves along it. These are not tied to ground entities. One can make rail segments that represent merchant marine lanes in the sea.

Public Member Functions | |
| DtRailSegment () | |
| DtRailSegment (const DtVector &start, const DtVector &end) | |
| virtual | ~DtRailSegment () |
| DtRailSegment (const DtRailSegment &orig) | |
| DtRailSegment & | operator= (const DtRailSegment &orig) |
| virtual DtRailSegment * | clone () |
| virtual double | defaultSegmentSpeedLimit () const |
| virtual double | laneCenterOffset (int lane) const |
| virtual std::list< int > | availableLanes () const |
| virtual double | length () const |
| virtual void | setStartPoint (const DtVector &start) |
| virtual const DtVector & | startPoint () const |
| virtual void | setEndPoint (const DtVector &end) |
| virtual const DtVector & | endPoint () const |
| virtual void | setSegmentSpeed (double speed) |
| virtual double | segmentSpeed () const |
| virtual void | setLaneWidth (double width) |
| virtual double | laneWidth () const |
| virtual void | setNumberOfLanes (unsigned int lanes) |
| virtual unsigned int | numberOfLanes () const |
| virtual int | leftLaneOfLane (int lane) const |
| virtual int | rightLaneOfLane (int lane) const |
| virtual double | findLaneShift (const int fromLane, const int toLane) const |
| virtual double | laneOffset (int lanePos) const |
| virtual void | setIsOneWay (bool way) |
| virtual bool | isOneWay () const |
| virtual void | setSpecificationID (const DtSpecificationID id) |
| virtual const DtSpecificationID | specificationID () const |
| virtual void | setPathId (const unsigned int id) |
| virtual const unsigned int | pathId () const |
| virtual void | setSegmentSurfaceConditions (DtVrfWeatherPrecipitationType condition) |
| virtual DtVrfWeatherPrecipitationType | segmentSurfaceConditions () const |
| virtual void | setMedianWidth (const double width) |
| virtual double | medianWidth () const |
| virtual void | setRoadName (const DtString name) |
| virtual DtString | roadName () const |
Static Public Member Functions | |
| static unsigned int | nextPathId () |
Static Protected Attributes | |
| static unsigned int | theNextPathId |
| DtRailSegment::DtRailSegment | ( | ) |
|
virtual |
| DtRailSegment::DtRailSegment | ( | const DtRailSegment & | orig | ) |
| DtRailSegment& DtRailSegment::operator= | ( | const DtRailSegment & | orig | ) |
|
virtual |
|
virtual |
The first point of the segment. (Local coordinates)
|
virtual |
The first point of the segment. (Local coordinates)
|
virtual |
The last point of the segment.
|
virtual |
The last point of the segment.
|
virtual |
The speed that is recommend along this segment. The Rail Movement Controller will check this speed and cap the entity's speed if it's speed exceeds the segment speed. no speeding.
|
virtual |
The speed that is recommend along this segment. The Rail Movement Controller will check this speed and cap the entity's speed if it's speed exceeds the segment speed. no speeding.
|
virtual |
The default speed limit used when none is provided in feature data or otherwise set. Always returns 50.0.
|
virtual |
The lane width of the segment lanes.
|
virtual |
The lane width of the segment lanes.
How many lanes are contained in the segment.
How many lanes are contained in the segment.
Gets the lane to the left of the lane specified. For countries that are reversed from the US, you should call the opposite function. For instance, in the UK, if you want the lane to the left of your current, you should call rightLaneOfLane() instead.
Gets the lane to the left of the lane specified. For countries that are reversed from the US, you should call the opposite function. For instance, in the UK, if you want the lane to the left of your current, you should call rightLaneOfLane() instead.
This finds the distance between the centerlines of 2 lanes in the segment.
lane offset is the width of all the lanes between the lanePos and the center line. Lanes are designated from (number of lanes)/2 to -(number of lanes)/2 from the centerline oriented from the segment's start to end point. So for person traveling from start to end on a 4 lane road, 1 is the far most right lane and the lane offset for that lane position would be one lane width. 2 and -2 would have no offset since they are in the lanes adjacent to the center line and 1/-1 would have one lane width.
|
virtual |
Directionality of the segment, whether it is one way or not.
|
virtual |
Directionality of the segment, whether it is one way or not.
|
virtual |
|
virtual |
The specification id of the feature data or route this segment is based from. This can be used to lookup more information about the type of segment in the DtSpecificationManager if so desired. DtSpecificationID is just an unsigned int. They correspond the DFAD codes which are used to identify a feature–is it a bridge, a gravel road, a canal.......
|
virtual |
The specification id of the feature data or route this segment is based from. This can be used to lookup more information about the type of segment in the DtSpecificationManager if so desired. DtSpecificationID is just an unsigned int. They correspond the DFAD codes which are used to identify a feature–is it a bridge, a gravel road, a canal.......
The path id is a simple way of keeping track of when we turn if we are just at a curve in the path in which case the two connecting segments will have the same id or if an intersection has been reached and the connecting segments will have different path ids.
The path id is a simple way of keeping track of when we turn if we are just at a curve in the path in which case the two connecting segments will have the same id or if an intersection has been reached and the connecting segments will have different path ids.
|
virtual |
Environmental Condition of segment. Rainy, sandstorm, high sea state... These are defined in vrfWeatherStateEnums.h.
|
virtual |
Environmental Condition of segment. Rainy, sandstorm, high sea state... These are defined in vrfWeatherStateEnums.h.
|
virtual |
In a two-way segment, the width of the median (impassable area) down the center.
|
virtual |
In a two-way segment, the width of the median (impassable area) down the center.
|
virtual |
The name of the road this segment is a part of (or empty)
|
virtual |
The name of the road this segment is a part of (or empty)
|
virtual |
When length is called it will recompute and cache the new length if the endpoints have changed. The same will happen for the length.
|
protected |
|
protected |
|
protected |
Default is 50 m/s. Make it high so default is to not interfere with driving and let user choose speed to travel at.
|
protected |
Default is 3.66m. This is U.S. Highway standard.
Default is 2 allowing a lane for each direction of traffic.
|
protected |
Default is false. Allowing traffic in each direction.
Keep track of if this segment is just a continuation of the current road. Upon reaching an intersection and turning, the ids will be different.
|
protected |
Default is 0. It will be set based on whatever feature it was created from.
|
protected |
Default is 0–No precipitation.
|
protected |
In a two-way segment, the width of the median (impassable area) down the center.
|
protected |
The name, if present.
|
mutableprotected |
These values are calculated when needed and cached.
|
mutableprotected |