#ifndef NAVMESHLOCATION_H #define NAVMESHLOCATION_H #include "../geo/Point3.h" class NavMeshTriangle; namespace NM { /** * as Point3 -> Triangle (on Mesh) lookups are expensive, * we try to combine both information (point -> triangle) * most of the time using this structure */ template struct NavMeshLocation { /** point within the world (in meter) */ Point3 pos; /** NavMeshTriangle the point belongs to */ const Tria* tria; /** empty ctor */ NavMeshLocation() : pos(0,0,0), tria(nullptr) { ; } /** ctor */ NavMeshLocation(const Point3 pos, const Tria* tria) : pos(pos), tria(tria) { ; } }; } #endif // NAVMESHLOCATION_H