| 3655 | } |
| 3656 | |
| 3657 | bool dtNavMeshQuery::isValidPolyRef(dtPolyRef ref, const dtQueryFilter* filter) const |
| 3658 | { |
| 3659 | const dtMeshTile* tile = 0; |
| 3660 | const dtPoly* poly = 0; |
| 3661 | dtStatus status = m_nav->getTileAndPolyByRef(ref, &tile, &poly); |
| 3662 | // If cannot get polygon, assume it does not exists and boundary is invalid. |
| 3663 | if (dtStatusFailed(status)) |
| 3664 | return false; |
| 3665 | // If cannot pass filter, assume flags has changed and boundary is invalid. |
| 3666 | if (!filter->passFilter(ref, tile, poly)) |
| 3667 | return false; |
| 3668 | return true; |
| 3669 | } |
| 3670 | |
| 3671 | /// @par |
| 3672 | /// |
no test coverage detected