]> git.localhorst.tv Git - space.git/blobdiff - src/ai/Autopilot.h
added autopilot that sucks
[space.git] / src / ai / Autopilot.h
diff --git a/src/ai/Autopilot.h b/src/ai/Autopilot.h
new file mode 100644 (file)
index 0000000..b15448e
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef SPACE_AUTOPILOT_H_
+#define SPACE_AUTOPILOT_H_
+
+#include "../graphics/Vector.h"
+
+
+namespace space {
+
+class Camera;
+class Canvas;
+class Ship;
+
+class Autopilot {
+
+public:
+       Autopilot(Ship &ctrl, const Vector<float> &target);
+
+public:
+       void Update(float deltaT);
+
+       void Render(Canvas &, const Camera &) const;
+
+private:
+       Ship *ctrl;
+       const Vector<float> *target;
+
+       // cache members for debug drawing
+       Vector<float> planFrom;
+       Vector<float> planTo;
+
+};
+
+}
+
+#endif