X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=antikythera;a=blobdiff_plain;f=src%2Fmachine.h;h=097157d62a3d4c9884485ff70ab652b34dc620fc;hp=86caa480595b893f9cf72f27e4398765da039181;hb=6879b81017c2662b0c5a0b9027df8cf13b10545a;hpb=014fccdee30291407985658e8cefd9be7dc9e9fa diff --git a/src/machine.h b/src/machine.h index 86caa48..097157d 100644 --- a/src/machine.h +++ b/src/machine.h @@ -2,6 +2,7 @@ #define MACHINE_H_ #include +#include #include "gear.h" struct Motor { @@ -12,6 +13,7 @@ struct Motor { class Machine { private: std::vector gears; + std::map gearidx; bool **meshing; bool meshing_valid; bool *visited; /* used for update_gear */ @@ -27,6 +29,8 @@ public: void add_gear(Gear *g); /* takes ownership */ void add_motor(int gearidx, float speed_hz); + int get_gear_index(Gear *g) const; + void invalidate_meshing(); void calc_meshing();