![]() |
VR-Forces 4.0.4 Class Documentation
|
This path metric requires an entity with a DtMovingObjectStateRepository and checks that that each point that is passed return true for isWaterSurface. More...

Public Member Functions | |
| DtSurfaceEntityPathMetric (DtVrfObject *entity) | |
| virtual | ~DtSurfaceEntityPathMetric () |
| virtual bool | init () |
| Call immediately after constructor. | |
| virtual double | transitionCost (const DtPoint &startPoint, const DtPoint &endPoint) const |
| Calculates the cost of moving directly from startPoint to endPoint Returns the actual distance if the surface is water, or -1 if any part of the sampled path is not water. | |
| virtual double | turningCost (double cosAngle) const |
| Returns a cost based on the turning radius of the vehicle. | |
| virtual void | setTerrainSampleDistance (double distance) |
| Sets the distance between terrain sample points used when calculating the cost of moving between two points. | |
| virtual double | terrainSampleDistance () const |
| Returns the current terrain sample distance. | |
Static Public Member Functions | |
| static DtPathMetric * | creator (DtVrfObject *entity) |
Protected Attributes | |
| DtPhysicalWorld * | myPhysicalWorld |
| double | myTerrainSampleDistance |
This path metric requires an entity with a DtMovingObjectStateRepository and checks that that each point that is passed return true for isWaterSurface.
Returned cost is the distance along the path, or -1 if the surface is not water.
| virtual DtSurfaceEntityPathMetric::~DtSurfaceEntityPathMetric | ( | ) | [virtual] |
| virtual bool DtSurfaceEntityPathMetric::init | ( | ) | [virtual] |
Call immediately after constructor.
Reimplemented from DtPathMetric.
| virtual double DtSurfaceEntityPathMetric::transitionCost | ( | const DtPoint & | startPoint, |
| const DtPoint & | endPoint | ||
| ) | const [virtual] |
Calculates the cost of moving directly from startPoint to endPoint Returns the actual distance if the surface is water, or -1 if any part of the sampled path is not water.
Implements DtPathMetric.
| virtual double DtSurfaceEntityPathMetric::turningCost | ( | double | cosAngle | ) | const [virtual] |
Returns a cost based on the turning radius of the vehicle.
Implements DtPathMetric.
| virtual void DtSurfaceEntityPathMetric::setTerrainSampleDistance | ( | double | distance | ) | [virtual] |
Sets the distance between terrain sample points used when calculating the cost of moving between two points.
This distance will be the average used. Default is 5.
| virtual double DtSurfaceEntityPathMetric::terrainSampleDistance | ( | ) | const [virtual] |
Returns the current terrain sample distance.
| static DtPathMetric* DtSurfaceEntityPathMetric::creator | ( | DtVrfObject * | entity | ) | [static] |
double DtSurfaceEntityPathMetric::myTerrainSampleDistance [protected] |