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
YASMIN/nav/grid/State.h
2018-07-11 19:04:42 +02:00

45 lines
1.0 KiB
C++

#ifndef GRID_STATE_H
#define GRID_STATE_H
#include <Indoor/grid/walk/v2/GridWalker.h>
#include <Indoor/grid/walk/v2/modules/WalkModuleActivityControl.h>
#include <Indoor/grid/walk/v2/modules/WalkModuleHeadingControl.h>
#include <Indoor/grid/walk/v2/modules/WalkModuleNodeImportance.h>
#include <Indoor/grid/walk/v2/modules/WalkModuleFavorZ.h>
namespace GridBased {
struct MyState : public WalkState, public WalkStateFavorZ, public WalkStateHeading {
/** ctor */
MyState(const int x_cm, const int y_cm, const int z_cm) : WalkState(GridPoint(x_cm, y_cm, z_cm)), WalkStateHeading(Heading(0), 0) {
;
}
MyState() : WalkState(GridPoint()), WalkStateHeading(Heading(0), 0) {
;
}
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 // GRID_STATE_H