meshing recaclulation on the fly, picking, whatever
[antikythera] / src / machine.h
index f222cd7..86caa48 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,10 +27,13 @@ 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);
        void draw() const;
+
+       Gear *intersect_gear(const Ray &ray, HitPoint *hitp = 0) const;
 };
 
 #endif // MACHINE_H_