VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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]

Public Member Functions

DtHumanPathMetric (DtVrfObject *entity)
**virtual ~DtHumanPathMetric ()
**virtual bool init ()
***********virtual double transitionCost (const DtPoint &startPoint,*const DtPoint &endPoint) const
 Calculates the cost of moving directly from startPoint to endPoint.
***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.
*****virtual void setTerrainSampleDistance (double distance)
 Sets the distance between terrain sample points used when.
***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

* DtHumanPathMetric::DtHumanPathMetric ( DtVrfObject entity)
* * virtual DtHumanPathMetric::~DtHumanPathMetric ( )
virtual

Member Function Documentation

* * virtual bool DtHumanPathMetric::init ( )
virtual
* * * * * * * * * * * 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.

* * * virtual double DtHumanPathMetric::turningCost ( double  cosAngle) const
virtual

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

* * * * * * * 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

* DtPhysicalWorld* DtHumanPathMetric::myPhysicalWorld
protected
* double DtHumanPathMetric::myTerrainSampleDistance
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)