blob: 1654ba25623ad1c929e9b8b0a85eb641d3798ece (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef RUNTIME_HEIGHT_MESH_QUERY
#define RUNTIME_HEIGHT_MESH_QUERY
#include "External/Recast/Detour/Include/DetourNavMeshQuery.h"
#include "HeightmapData.h"
class dtNavMeshQuery;
class Vector3f;
// Query specialization for Height Placement of a HeightMesh.
class HeightMeshQuery : public dtHeightQuery
{
public:
HeightMeshQuery ();
virtual ~HeightMeshQuery ();
void Init (const HeightmapDataVector* heightMaps, float verticalRayOffset);
virtual dtStatus getHeight (const dtMeshTile* tile, const dtPoly* poly, const float* pos, float* height) const;
bool GetTerrainHeight (const Vector3f& position, float* height) const;
private:
bool GetGeometryHeight (const dtMeshTile* tile, const dtPoly* poly, const Vector3f& pos, float* height) const;
const HeightmapDataVector* m_HeightMaps;
float m_VerticalRayOffset;
};
#endif
|