added nav-mesh support via demo

This commit is contained in:
k-a-z-u
2018-01-24 11:26:26 +01:00
parent f4c598299f
commit de2570cc0c
6 changed files with 810 additions and 475 deletions

32
navMesh/mesh.h Normal file
View File

@@ -0,0 +1,32 @@
#ifndef NAV_MESH_MESH_H
#define NAV_MESH_MESH_H
#include <Indoor/navMesh/NavMesh.h>
#include <Indoor/navMesh/NavMeshLocation.h>
#include <Indoor/navMesh/NavMeshRandom.h>
#include <Indoor/navMesh/NavMeshFactory.h>
#include <Indoor/navMesh/walk/NavMeshWalkSimple.h>
#include <Indoor/navMesh/meta/NavMeshDijkstra.h>
/** the triangle to use with the nav-mesh */
class MyNavMeshTriangle : public NM::NavMeshTriangle, public NM::NavMeshTriangleDijkstra {
// add own parameters here
public:
MyNavMeshTriangle(const Point3 p1, const Point3 p2, const Point3 p3, uint8_t type) : NM::NavMeshTriangle(p1, p2, p3, type) {
;
}
};
using MyNavMeshFactory = NM::NavMeshFactory<MyNavMeshTriangle>;
using MyNavMesh = NM::NavMesh<MyNavMeshTriangle>;
using MyNavMeshLocation = NM::NavMeshLocation<MyNavMeshTriangle>;
using MyNavMeshRandom = NM::NavMeshRandom<MyNavMeshTriangle>;
using MyNavMeshWalkParams = NM::NavMeshWalkParams<MyNavMeshTriangle>;
#endif