refactoring to add nav mesh

This commit is contained in:
k-a-z-u
2018-07-11 19:04:42 +02:00
parent bb974d3871
commit b4a1a3d969
27 changed files with 1581 additions and 712 deletions

45
nav/mesh/State.h Normal file
View File

@@ -0,0 +1,45 @@
#ifndef MESH_STATE_H
#define MESH_STATE_H
#include <Indoor/navMesh/NavMesh.h>
#include <Indoor/navMesh/NavMeshTriangle.h>
#include <Indoor/geo/Heading.h>
namespace MeshBased {
struct MyState {
NM::NavMeshLocation<NM::NavMeshTriangle> loc;
Heading heading;
/** ctor */
MyState() : loc(), heading(0) {
;
}
/** ctor */
MyState(NM::NavMeshLocation<NM::NavMeshTriangle> loc, Heading h) : loc(loc), heading(h) {
;
}
// MyState& operator += (const MyState& o) {
// position += o.position;
// return *this;
// }
// MyState& operator /= (const float val) {
// position /= val;
// return *this;
// }
// MyState operator * (const float val) const {
// MyState copy = *this;
// copy.position = copy.position * val;
// return copy;
// }
};
}
#endif // MESH_STATE_H