Planeshift
Public Member Functions

dtQueryFilter Class Reference

Defines polygon filtering and traversal costs for navigation mesh query operations. More...

#include <DetourNavMeshQuery.h>

List of all members.

Public Member Functions

 dtQueryFilter ()
float getCost (const float *pa, const float *pb, const dtPolyRef prevRef, const dtMeshTile *prevTile, const dtPoly *prevPoly, const dtPolyRef curRef, const dtMeshTile *curTile, const dtPoly *curPoly, const dtPolyRef nextRef, const dtMeshTile *nextTile, const dtPoly *nextPoly) const
 Returns cost to move from the beginning to the end of a line segment that is fully contained within a polygon.
bool passFilter (const dtPolyRef ref, const dtMeshTile *tile, const dtPoly *poly) const
 Returns true if the polygon can be visited. (I.e. Is traversable.)
Getters and setters for the default implementation data.
float getAreaCost (const int i) const
 Returns the traversal cost of the area.
void setAreaCost (const int i, const float cost)
 Sets the traversal cost of the area.
unsigned short getIncludeFlags () const
 Returns the include flags for the filter. Any polygons that include one or more of these flags will be included in the operation.
void setIncludeFlags (const unsigned short flags)
 Sets the include flags for the filter.
unsigned short getExcludeFlags () const
 Returns the exclude flags for the filter. Any polygons that include one ore more of these flags will be excluded from the operation.
void setExcludeFlags (const unsigned short flags)
 Sets the exclude flags for the filter.

Detailed Description

Defines polygon filtering and traversal costs for navigation mesh query operations.

Definition at line 35 of file DetourNavMeshQuery.h.


Constructor & Destructor Documentation

dtQueryFilter::dtQueryFilter ( )

Member Function Documentation

float dtQueryFilter::getAreaCost ( const int  i) const [inline]

Returns the traversal cost of the area.

Parameters:
[in]iThe id of the area.
Returns:
The traversal cost of the area.

Definition at line 89 of file DetourNavMeshQuery.h.

float dtQueryFilter::getCost ( const float pa,
const float pb,
const dtPolyRef  prevRef,
const dtMeshTile prevTile,
const dtPoly prevPoly,
const dtPolyRef  curRef,
const dtMeshTile curTile,
const dtPoly curPoly,
const dtPolyRef  nextRef,
const dtMeshTile nextTile,
const dtPoly nextPoly 
) const

Returns cost to move from the beginning to the end of a line segment that is fully contained within a polygon.

Parameters:
[in]paThe start position on the edge of the previous and current polygon. [(x, y, z)]
[in]pbThe end position on the edge of the current and next polygon. [(x, y, z)]
[in]prevRefThe reference id of the previous polygon. [opt]
[in]prevTileThe tile containing the previous polygon. [opt]
[in]prevPolyThe previous polygon. [opt]
[in]curRefThe reference id of the current polygon.
[in]curTileThe tile containing the current polygon.
[in]curPolyThe current polygon.
[in]nextRefThe refernece id of the next polygon. [opt]
[in]nextTileThe tile containing the next polygon. [opt]
[in]nextPolyThe next polygon. [opt]
unsigned short dtQueryFilter::getExcludeFlags ( ) const [inline]

Returns the exclude flags for the filter. Any polygons that include one ore more of these flags will be excluded from the operation.

Definition at line 108 of file DetourNavMeshQuery.h.

unsigned short dtQueryFilter::getIncludeFlags ( ) const [inline]

Returns the include flags for the filter. Any polygons that include one or more of these flags will be included in the operation.

Definition at line 99 of file DetourNavMeshQuery.h.

bool dtQueryFilter::passFilter ( const dtPolyRef  ref,
const dtMeshTile tile,
const dtPoly poly 
) const

Returns true if the polygon can be visited. (I.e. Is traversable.)

Parameters:
[in]refThe reference id of the polygon test.
[in]tileThe tile containing the polygon.
[in]polyThe polygon to test.
void dtQueryFilter::setAreaCost ( const int  i,
const float  cost 
) [inline]

Sets the traversal cost of the area.

Parameters:
[in]iThe id of the area.
[in]costThe new cost of traversing the area.

Definition at line 94 of file DetourNavMeshQuery.h.

void dtQueryFilter::setExcludeFlags ( const unsigned short  flags) [inline]

Sets the exclude flags for the filter.

Parameters:
[in]flagsThe new flags.

Definition at line 112 of file DetourNavMeshQuery.h.

void dtQueryFilter::setIncludeFlags ( const unsigned short  flags) [inline]

Sets the include flags for the filter.

Parameters:
[in]flagsThe new flags.

Definition at line 103 of file DetourNavMeshQuery.h.


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