Public Member Functions |
| | DtRailMovementDriver (DtRailMovementController *parentController, bool drivingOnLeft, bool allowPassing, double lookAhead, double hitTime) |
| | The DtSimComponent class is the base class for the entire simulation model component hierarchy. (const DtString&,DtVrfObject*,DtSimManager*,
|
| virtual | ~DtRailMovementDriver () |
| | destructor
|
| virtual void | setEntityState (DtVrfMovingObjectStateRepository *state) |
| virtual double | findDrivingSpeed (bool useAcceleration, DtVrfObject *convoyTgt=0, const double followDist=0.0, const bool useCatchUpSpeed=true) |
| | Determines the speed to be used for the movement state.
|
| virtual double | calculateCurrentBrakingDistance () const |
| virtual void | setCurrentSegment (DtRailSegment *seg) |
| virtual DtRailSegment * | currentSegment () |
| virtual void | setTurnSpeed (const double speed) |
| virtual const double | turnSpeed () const |
| virtual double | determineSpeedGivenObs (const double drivingSpeed, const double hitTime, const DtRailObstructionPtr &obs) const |
| | negative value means don't change anything
|
| virtual bool | isSwitchingLeft (const int current, const int passing) const |
| virtual bool | isSwitchingRight (const int current, const int passing) const |
| virtual int | findClosestLaneToDrivingLane (const int current, const int driving, const DtRailSegment *road) const |
| | returns either a lane to switch in, or the current lane if it can't find a lane to switch to or 0.
|
| virtual bool | isObstructionConvoyTarget (const int lane, DtRailObstructionPtr &anObstruction, DtString convoyTgt) const |
| virtual bool | isLaneObstructed (const int lane, DtRailObstructionAnalyzer &analyzer, bool checkForwardOnly=false) const |
| virtual bool | isObstructionStoppedOrSlow (double speed, DtRailObstructionPtr &obs) const |
| virtual bool | isDrivingLane (const int current, const int driving) const |
| virtual int | findOpenLeftLane (const int lane, const DtRailSegment *road, DtRailObstructionAnalyzer &analyzer) const |
| virtual int | findOpenRightLane (const int lane, const DtRailSegment *road, DtRailObstructionAnalyzer &analyzer) const |
| virtual int | findOpenLane (const int lane, const int passing, const DtRailSegment *road, DtRailObstructionAnalyzer &analyzer, bool checkOpposite=false) const |
| | finds an open lane depending
|
| virtual bool | isTooCloseToObs (const DtRailObstructionPtr &nextObs, double bvRadiusSq) const |
| | Compares the distanceSq between entity and nextObs and if that distance is less than 2 car lengths returns true.
|
| virtual bool | allowPassing () |
DtRailMovementDriver determines how the entity should be moving along the segment.
It determines the driving speed, whether the entity should pass another entity, come to a stop at an intersection and so forth.
| DtRailMovementDriver::DtRailMovementDriver |
( |
DtRailMovementController * |
parentController, |
|
|
bool |
drivingOnLeft, |
|
|
bool |
allowPassing, |
|
|
double |
lookAhead, |
|
|
double |
hitTime |
|
) |
| |
The DtSimComponent class is the base class for the entire simulation model component hierarchy. (const DtString&,DtVrfObject*,DtSimManager*,
****** NOTE of API change for version 3.7 ****** Due to a performance enhancement change, the myComponentDescriptor member variable is now defined to be const and all access to this descriptor (including the componentDescriptor() method) have been changed to be const access. If you have used this descriptor to modify values within the descriptor (either in the original descriptor or a derived descriptor class), this modification will effect all entities that share this descriptor as this descriptor now points to the original parameter database entry.If you currently modify member variables in a descriptor class, it is suggested to instead make those member variables part of the component that uses them and modify them there. If you must modify the entries in the component descriptor, instead of using the supplied descriptor pointer, you will need to clone the descriptor entry and work with that clone. You will also need to delete this clone in your component destructor to avoid a memory leak.
- Examples
-
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)