removed KLib stuff added new activity filter is uncommand! at the moment, the app is not able to load new maps and breaks using old maps
48 lines
878 B
C++
48 lines
878 B
C++
#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) {
|
|
loc.pos += o.loc.pos;
|
|
return *this;
|
|
}
|
|
|
|
MyState& operator /= (const float val) {
|
|
loc.pos /= val;
|
|
return *this;
|
|
}
|
|
|
|
MyState operator * (const float val) const {
|
|
MyState copy = *this;
|
|
copy.loc.pos = copy.loc.pos * val;
|
|
return copy;
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif // MESH_STATE_H
|