Go to the source code of this file.
|
| NAVMESH_API bool | dtCreateNavMeshData (dtNavMeshCreateParams *params, unsigned char **outData, int *outDataSize) |
| |
| NAVMESH_API bool | dtNavMeshHeaderSwapEndian (unsigned char *data, const int dataSize) |
| |
| NAVMESH_API bool | dtNavMeshDataSwapEndian (unsigned char *data, const int dataSize) |
| |
| NAVMESH_API bool | dtTransformTileData (unsigned char *data, const int dataSize, const int offsetX, const int offsetY, const dtReal tileWidth, const dtReal tileHeight, const dtReal rotationDeg, const dtReal bvQuantFactor) |
| |
| NAVMESH_API void | dtComputeTileOffsetFromRotation (const dtReal *position, const dtReal *rotationCenter, const dtReal rotationDeg, const dtReal tileWidth, const dtReal tileHeight, int &deltaX, int &deltaY) |
| |
◆ dtComputeTileOffsetFromRotation()
Compute XY offset caused by the given rotation
- Parameters
-
| [in] | position | Position to rotate. [(x, y, z)] |
| [in] | rotationCenter | Rotation center. [(x, y, z)] |
| [in] | rotationDeg | Rotation in degrees. |
| [in] | tileWidth | Tile width. |
| [in] | tileHeight | Tile height. |
| [out] | deltaX | Offset X in tile coordinates. |
| [out] | deltaY | Offset Y in tile coordinates. |
◆ dtNavMeshDataSwapEndian()
Swaps endianess of the tile data.
- Parameters
-
| [in,out] | data | The tile data array. |
| [in] | dataSize | The size of the data array. |
- Warning
- This function assumes that the header is in the correct endianess already. Call dtNavMeshHeaderSwapEndian() first on the data if the data is expected to be in wrong endianess to start with. Call dtNavMeshHeaderSwapEndian() after the data has been swapped if converting from native to foreign endianess.
◆ dtNavMeshHeaderSwapEndian()
Swaps the endianess of the tile data's header (dtMeshHeader).
- Parameters
-
| [in,out] | data | The tile data array. |
| [in] | dataSize | The size of the data array. |
◆ dtTransformTileData()
Offset and rotate around center the data in the tile
- Parameters
-
| [in,out] | data | Data of the tile mesh. (See: dtCreateNavMeshData) |
| [in] | dataSize | Data size of the tile mesh. |
| [in] | offsetX | X offset in tile coordinates. |
| [in] | offsetY | Y offset in tile coordinates. |
| [in] | tileWidth | Tile width. |
| [in] | tileHeight | Tile height. |
| [in] | rotationDeg | Rotation in degrees. |