#ifndef GRID_STATE_H #define GRID_STATE_H #include #include #include #include #include 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