This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/navMesh/NavMeshLocation.h
k-a-z-u fee6cd3496 worked on navMesh stuff
- creation
- walking
- helper
2018-01-10 16:57:19 +01:00

38 lines
687 B
C++

#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 <typename Tria> 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