VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Attributes
DtSurfaceEntityPathMetric Class Reference

This path metric requires an entity with a DtMovingObjectStateRepository and checks that that each point that is passed return true for isWaterSurface. More...

Inheritance diagram for DtSurfaceEntityPathMetric:
Inheritance graph
[legend]

List of all members.

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 DtPathMetriccreator (DtVrfObject *entity)

Protected Attributes

DtPhysicalWorldmyPhysicalWorld
double myTerrainSampleDistance

Detailed Description

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.


Constructor & Destructor Documentation


Member Function Documentation

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.


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)