![]() |
VR-Forces Development_Version Class Documentation
|
DtRailSegment are segments entities can follow when using the rail movement system. More...

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 | laneCenterOffset (int lane) const |
| virtual std::list< int > | availableLanes () const |
| virtual double | length () const |
| When length is called it will recompute and cache the new length if the endpoints have changed. | |
| virtual void | setStartPoint (const DtVector &start) |
| The first point of the segment. | |
| virtual const DtVector & | startPoint () const |
| The first point of the segment. | |
| virtual void | setEndPoint (const DtVector &end) |
| The last point of the segment. | |
| virtual const DtVector & | endPoint () const |
| The last point of the segment. | |
| virtual void | setSegmentSpeed (double speed) |
| The speed that is recommend along this segment. | |
| virtual double | segmentSpeed () const |
| The speed that is recommend along this segment. | |
| virtual void | setLaneWidth (double width) |
| The lane width of the segment lanes. | |
| virtual double | laneWidth () const |
| The lane width of the segment lanes. | |
| virtual void | setNumberOfLanes (unsigned int lanes) |
| How many lanes are contained in the segment. | |
| virtual unsigned int | numberOfLanes () const |
| How many lanes are contained in the segment. | |
| virtual int | leftLaneOfLane (unsigned lane) const |
| Gets the lane to the left of the lane specified. | |
| virtual int | rightLaneOfLane (unsigned lane) const |
| Gets the lane to the left of the lane specified. | |
| virtual double | findLaneShift (const int fromLane, const int toLane) const |
| This finds the distance between the 2 lanes. | |
| virtual double | laneOffset (int lanePos) const |
| lane offset is the width of all the lanes between the lanePos and the center line Lanes are designated from (number of lanes)/2 -(number of lanes)/2 from the centerline oriented from the segment's start to end point. | |
| virtual void | setIsOneWay (bool way) |
| Directionality of the segment, whether it is one way or not. | |
| virtual bool | isOneWay () const |
| Directionality of the segment, whether it is one way or not. | |
| virtual void | setSpecificationID (const DtSpecificationID id) |
| The specification id of the feature data or route this segment is based from. | |
| virtual const DtSpecificationID | specificationID () const |
| The specification id of the feature data or route this segment is based from. | |
| virtual void | setPathId (const unsigned int id) |
| 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 const unsigned int | pathId () const |
| 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 void | setSegmentSurfaceConditions (DtVrfWeatherPrecipitationType condition) |
| Enviromental Condition of segment. | |
| virtual DtVrfWeatherPrecipitationType | segmentSurfaceConditions () const |
| Enviromental Condition of segment. | |
Static Public Member Functions | |
| static unsigned int | nextPathId () |
Protected Attributes | |
| DtVector | myStartPoint |
| DtVector | myEndPoint |
| double | mySpeed |
| Default is 50 m/s. | |
| double | myLaneWidth |
| Default is 3.66m. This is U.S. Highway standard. | |
| unsigned int | myNumberOfLanes |
| Default is 2 allowing a lane for each direction of traffic. | |
| bool | myIsOneWay |
| Default is false. Allowing traffic in each direction. | |
| unsigned int | myPathId |
| Keep track of if this segment is just a continuation of the current road. | |
| DtSpecificationID | mySpecId |
| Default is 0. It will be set based on whatever feature it was created from. | |
| DtVrfWeatherPrecipitationType | mySurfaceCondition |
| Default is 0–No percipitation. | |
| double | myLength |
| These values are calculated when needed and cached. | |
| bool | myRecomputeLength |
Static Protected Attributes | |
| static unsigned int | theNextPathId |
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.
| DtRailSegment::DtRailSegment | ( | ) |
|
virtual |
| DtRailSegment::DtRailSegment | ( | const DtRailSegment & | orig | ) |
| DtRailSegment& DtRailSegment::operator= | ( | const DtRailSegment & | orig | ) |
Reimplemented in DtRwRailSegment.
|
virtual |
|
virtual |
The first point of the segment.
|
virtual |
The first point of the segment.
|
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 lane width of the segment lanes.
|
virtual |
The lane width of the segment lanes.
|
virtual |
How many lanes are contained in the segment.
|
virtual |
How many lanes are contained in the segment.
|
virtual |
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.
|
virtual |
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.
|
virtual |
This finds the distance between the 2 lanes.
|
virtual |
lane offset is the width of all the lanes between the lanePos and the center line Lanes are designated from (number of lanes)/2 -(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 |
|
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.......
|
virtual |
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 |
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 |
Enviromental Condition of segment.
Rainy, sandstorm, high sea state... These are defined in vrfWeatherStateEnums.h
|
virtual |
Enviromental Condition of segment.
Rainy, sandstorm, high sea state... These are defined in vrfWeatherStateEnums.h
|
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.
|
static |
|
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.
|
protected |
Default is 2 allowing a lane for each direction of traffic.
|
protected |
Default is false. Allowing traffic in each direction.
|
protected |
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 percipitation.
|
mutableprotected |
These values are calculated when needed and cached.
|
mutableprotected |
|
staticprotected |