Add documentation about data to addTile

dtNavMesh needs exclusive access to the data passed to addTile since it
will make dynamic changes to this at runtime. For that reason the data
should not be reused until the tile has been removed from the nav mesh
again.

Fix #149
This commit is contained in:
Jakob Botsch Nielsen 2016-01-14 00:27:40 +01:00
parent 5a342b83e8
commit 67590642c7

View File

@ -837,6 +837,11 @@ int dtNavMesh::queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, co
/// tile will be restored to the same values they were before the tile was /// tile will be restored to the same values they were before the tile was
/// removed. /// removed.
/// ///
/// The nav mesh assumes exclusive access to the data passed and will make
/// changes to the dynamic portion of the data. For that reason the data
/// should not be reused in other nav meshes until the tile has been successfully
/// removed from this nav mesh.
///
/// @see dtCreateNavMeshData, #removeTile /// @see dtCreateNavMeshData, #removeTile
dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags, dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags,
dtTileRef lastRef, dtTileRef* result) dtTileRef lastRef, dtTileRef* result)