![]() |
VR-Forces 4.0.4 Class Documentation
|
It finds the shortest route to the goal. More...

Public Member Functions | |
| DtRailPathMetric (DtVrfObject *entity) | |
| virtual | ~DtRailPathMetric () |
| virtual bool | init () |
| Call immediately after constructor. | |
| virtual double | transitionCost (const DtPoint &startPoint, const DtPoint &endPoint) const |
| Just returns the distance between points. | |
| virtual double | transitionCost (const DtPoint &startPoint, DtNetworkEdge *edge) |
| Just returns the length of the edge. | |
| virtual double | turningCost (double cosAngle) const |
| Returns a cost based on the turning radius of the vehicle. | |
| virtual double | multiplierForPoint (const DtPoint &point) const |
| Override this function to add your own cost calculations to the path. | |
Static Public Member Functions | |
| static DtPathMetric * | creator (DtVrfObject *entity) |
Protected Attributes | |
| DtPhysicalWorld * | myPhysicalWorld |
It finds the shortest route to the goal.
The returned cost is the distance across the segment.
| DtRailPathMetric::DtRailPathMetric | ( | DtVrfObject * | entity | ) |
| virtual DtRailPathMetric::~DtRailPathMetric | ( | ) | [virtual] |
| virtual bool DtRailPathMetric::init | ( | ) | [virtual] |
Call immediately after constructor.
Reimplemented from DtPathMetric.
| virtual double DtRailPathMetric::transitionCost | ( | const DtPoint & | startPoint, |
| const DtPoint & | endPoint | ||
| ) | const [virtual] |
Just returns the distance between points.
Implements DtPathMetric.
| virtual double DtRailPathMetric::transitionCost | ( | const DtPoint & | startPoint, |
| DtNetworkEdge * | edge | ||
| ) | [virtual] |
Just returns the length of the edge.
| virtual double DtRailPathMetric::turningCost | ( | double | cosAngle | ) | const [virtual] |
Returns a cost based on the turning radius of the vehicle.
Implements DtPathMetric.
| virtual double DtRailPathMetric::multiplierForPoint | ( | const DtPoint & | point | ) | const [virtual] |
Override this function to add your own cost calculations to the path.
Default implementation return 1.0. To further customize this metric, override this method and return a multiplier for each point. Do not return less than 1.0 in order to keep the optimistic heuristic rule.
| static DtPathMetric* DtRailPathMetric::creator | ( | DtVrfObject * | entity | ) | [static] |
DtPhysicalWorld* DtRailPathMetric::myPhysicalWorld [protected] |