engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
dtQueryFilter类 参考

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

#include <DetourNavMeshQuery.h>

Public 成员函数

void copyFrom (const dtQueryFilter *other)
 Copy data values from source filter
 
bool equals (const dtQueryFilter *other) const
 Check if two filters have the same data values
 
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. 更多...
 
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. 更多...
 
const float * getAllAreaCosts () const
 
float getModifiedHeuristicScale () const
 
float getHeuristicScale () const
 Retrieves euclidean distance heuristic scale 更多...
 
void setHeuristicScale (const float newScale)
 Set euclidean distance heuristic scale
 
bool isValidLinkSide (const unsigned char side) const
 Filters link in regards to its side. 更多...
 
void setIsBacktracking (const bool isBacktracking)
 Sets up filter for backtracking
 
bool getIsBacktracking () const
 Retrieves information whether this filter is set up for backtracking 更多...
 
void setShouldIgnoreClosedNodes (const bool shouldIgnore)
 Instruct filter whether it can reopen nodes already on closed list
 
bool getShouldIgnoreClosedNodes () const
 Retrieves information whether this filter allows reopening closed nodes 更多...
 
unsigned short getIncludeFlags () const
 Returns the include flags for the filter. 更多...
 
void setIncludeFlags (const unsigned short flags)
 Sets the include flags for the filter. 更多...
 
unsigned short getExcludeFlags () const
 Returns the exclude flags for the filter. 更多...
 
void setExcludeFlags (const unsigned short flags)
 Sets the exclude flags for the filter. 更多...
 

Protected 成员函数

float getInlineCost (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
 inlined scoring function. 更多...
 
virtual float getVirtualCost (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
 virtual scoring function implementation (defaults to getInlineCost). 更多...
 
bool passInlineFilter (const dtPolyRef ref, const dtMeshTile *tile, const dtPoly *poly) const
 inlined filter implementation. 更多...
 
virtual bool passVirtualFilter (const dtPolyRef ref, const dtMeshTile *tile, const dtPoly *poly) const
 virtual filter implementation (defaults to passInlineFilter). 更多...
 

详细描述

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

成员函数说明

◆ getAreaCost()

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

Returns the traversal cost of the area.

参数
[in]iThe id of the area.
返回
The traversal cost of the area.

◆ getCost()

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
inline

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

参数
[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 reference id of the next polygon. [opt]
[in]nextTileThe tile containing the next polygon. [opt]
[in]nextPolyThe next polygon. [opt]

◆ getExcludeFlags()

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.

◆ getHeuristicScale()

float dtQueryFilter::getHeuristicScale ( ) const
inline

Retrieves euclidean distance heuristic scale

返回
heuristic scale

◆ getIncludeFlags()

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.

◆ getInlineCost()

float dtQueryFilter::getInlineCost ( 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
inlineprotected

inlined scoring function.

参见
getCost for parameter description

◆ getIsBacktracking()

bool dtQueryFilter::getIsBacktracking ( ) const
inline

Retrieves information whether this filter is set up for backtracking

返回
is backtracking

◆ getShouldIgnoreClosedNodes()

bool dtQueryFilter::getShouldIgnoreClosedNodes ( ) const
inline

Retrieves information whether this filter allows reopening closed nodes

返回
should consider reopening nodes already on closed list

◆ getVirtualCost()

virtual float dtQueryFilter::getVirtualCost ( 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
inlineprotectedvirtual

virtual scoring function implementation (defaults to getInlineCost).

参见
getCost for parameter description

◆ isValidLinkSide()

bool dtQueryFilter::isValidLinkSide ( const unsigned char  side) const
inline

Filters link in regards to its side.

Used for backtracking.

返回
should link with this side be accepted

◆ passFilter()

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

Returns true if the polygon can be visited.

(I.e. Is traversable.)

参数
[in]refThe reference id of the polygon test.
[in]tileThe tile containing the polygon.
[in]polyThe polygon to test.

◆ passInlineFilter()

bool dtQueryFilter::passInlineFilter ( const dtPolyRef  ref,
const dtMeshTile *  tile,
const dtPoly *  poly 
) const
inlineprotected

inlined filter implementation.

参见
passFilter for parameter description

◆ passVirtualFilter()

virtual bool dtQueryFilter::passVirtualFilter ( const dtPolyRef  ref,
const dtMeshTile *  tile,
const dtPoly *  poly 
) const
inlineprotectedvirtual

virtual filter implementation (defaults to passInlineFilter).

参见
passFilter for parameter description

◆ setAreaCost()

void dtQueryFilter::setAreaCost ( const int  i,
const float  cost 
)
inline

Sets the traversal cost of the area.

参数
[in]iThe id of the area.
[in]costThe new cost of traversing the area.

◆ setExcludeFlags()

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

Sets the exclude flags for the filter.

参数
[in]flagsThe new flags.

◆ setIncludeFlags()

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

Sets the include flags for the filter.

参数
[in]flagsThe new flags.

该类的文档由以下文件生成: