Artificial Intelligence
Static Public Member Functions

OpenSteer::PointToPathAlikeMapping< PathAlike, Mapping, BaseDataExtractionPolicy > Class Template Reference

#include <QueryPathAlike.h>

List of all members.

Static Public Member Functions

static void map (PathAlike const &pathAlike, Vec3 const &queryPoint, Mapping &mapping)

Detailed Description

template<class PathAlike, class Mapping, class BaseDataExtractionPolicy = PointToPathAlikeBaseDataExtractionPolicy< PathAlike >>
class OpenSteer::PointToPathAlikeMapping< PathAlike, Mapping, BaseDataExtractionPolicy >

Provides functionality to map points or distances to path alikes and to extract associated information.


Member Function Documentation

template<class PathAlike , class Mapping , class BaseDataExtractionPolicy = PointToPathAlikeBaseDataExtractionPolicy< PathAlike >>
static void OpenSteer::PointToPathAlikeMapping< PathAlike, Mapping, BaseDataExtractionPolicy >::map ( PathAlike const &  pathAlike,
Vec3 const &  queryPoint,
Mapping &  mapping 
) [inline, static]

Maps queryPoint to a path alike pathAlike and returns the queried data in mapping.

Mapping must provide the following member functions to set queried values. Member functions might be empty if the specific data isn't needed. A good compiler should optimize the empty member function calls and the associated calculations for its parameters away.

void setPointOnPathCenterLine( Vec3 const& ) void setPointOnPathBoundary( Vec3 const& ) void setRadius( float ) void setTangent( Vec3 const& ) void setSegmentIndex( typename SegmentedPathAlike::size_type ) void setDistancePointToPath( float ) void setDistancePointToPathCenterLine( float ) void setDistanceOnPath( float ) void setDistanceOnSegment( float )

To query for the distance on the path the two following member functions of Mapping must be provided too:

void setDistanceOnPathFlag( float ) and float distanceOnPathFlag() const .

If the distance along the path shouldn't be extracted empty versions of these member functions are possible.

QueryPathAlikeUtilities.h provides some base classes to inherit from to automatically get some of the functionality described above.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines