lazy meshing
[antikythera] / src / machine.h
index f222cd7..5513e02 100644 (file)
@@ -13,6 +13,7 @@ class Machine {
 private:
        std::vector<Gear*> gears;
        bool **meshing;
+       bool meshing_valid;
        bool *visited;  /* used for update_gear */
 
        std::vector<Motor> motors;
@@ -26,6 +27,7 @@ public:
        void add_gear(Gear *g); /* takes ownership */
        void add_motor(int gearidx, float speed_hz);
 
+       void invalidate_meshing();
        void calc_meshing();
 
        void update(float dt);