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

Path planning metric used with the DtPathPlanner. More...

Inheritance diagram for DtHumanPathMetric:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtHumanPathMetric (DtVrfObject *entity)
virtual ~DtHumanPathMetric ()
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 based on what slope is between the points.
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.
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

Path planning metric used with the DtPathPlanner.

Checks the slope and of the terrain being passed over, compares them to the capabilities of the entity, and returns a cost based on those values.

The returned cost is equivalent to the distance across a flat paved surface the vehicle would need to travel to cross the segment.


Constructor & Destructor Documentation


Member Function Documentation

virtual bool DtHumanPathMetric::init ( ) [virtual]

Call immediately after constructor.

Reimplemented from DtPathMetric.

virtual double DtHumanPathMetric::transitionCost ( const DtPoint startPoint,
const DtPoint endPoint 
) const [virtual]

Calculates the cost of moving directly from startPoint to endPoint based on what slope is between the points.

Takes samples of the terrain along the segment at terrainSampleDistance apart and calls multiplierForPoint() for each point checked along the segment. Note: this function makes a blocking terrain call to insure the required data is paged in. It also sets overrideBlockingAssert on its call to DtPhysicalWorld::terrainHeightAndSurface to prevent an assertion. This is safe because this function is not called from the main simulation thread.

Implements DtPathMetric.

virtual double DtHumanPathMetric::turningCost ( double  cosAngle) const [virtual]

Returns a cost based on the turning radius of the vehicle.

Implements DtPathMetric.

virtual double DtHumanPathMetric::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.

virtual void DtHumanPathMetric::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.

virtual double DtHumanPathMetric::terrainSampleDistance ( ) const [virtual]

Returns the current terrain sample distance.

static DtPathMetric* DtHumanPathMetric::creator ( DtVrfObject entity) [static]

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)