MCPcopy Create free account
hub / github.com/axmolengine/axmol / getPolyRefBase

Method getPolyRefBase

3rdparty/recast/DetourNavMesh.cpp:1356–1361  ·  view source on GitHub ↗

@par Example use case: @code const dtPolyRef base = navmesh->getPolyRefBase(tile); for (int i = 0; i < tile->header->polyCount; ++i) { const dtPoly* p = &tile->polys[i]; const dtPolyRef ref = base | (dtPolyRef)i; // Use the reference to access the polygon data. } @endcode

Source from the content-addressed store, hash-verified

1354/// }
1355/// @endcode
1356dtPolyRef dtNavMesh::getPolyRefBase(const dtMeshTile* tile) const
1357{
1358 if (!tile) return 0;
1359 const unsigned int it = (unsigned int)(tile - m_tiles);
1360 return encodePolyId(tile->salt, it, 0);
1361}
1362
1363struct dtTileState
1364{

Callers 7

findRandomPointMethod · 0.80
queryPolygonsInTileMethod · 0.80
moveAlongSurfaceMethod · 0.80
getPolyWallSegmentsMethod · 0.80
findDistanceToWallMethod · 0.80
drawMeshTileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected