#ifndef H_CONTROL
#define H_CONTROL


#include "includes.h"
#include "actor.h"

#define MOVECURSORSTATE 0
#define MOVECAMERASTATE 1
#define AUTOCAMERASTATE 2

#define FLYINGCAMERA 0
#define WALKINGCAMERA 1

class Input;
class Node;

class Control: public Actor {

public:

   static bool bRunning;
   static vector <Node *> nodeList;              //all Nodes
   static vector<Node *> nodeTree;               //currently active nodes

   Actor *viewParent;
   Vector3f viewLocation;
   Vector3f viewTarget;

   Vector3f destLocation;
   Vector3f destTarget;
   Vector3f velocityLoc;
   Vector3f velocityView;
   Vector3f travelTime;

   Vector3f lookDir;
   int state;
   int moveMode;

   Control();

   void processMove(double deltaTime);
   void update(double deltaTime);
   void confineMouse();

   void switchMode();
   void toggleFlyMode();
   void start();
   void stop();
   void updateNodes();
   /*
   void interpolateTo(Vector3f targetLoc, Vector3f targetView);
   void interpolateToSpring(Vector3f targetLoc, Vector3f targetView);
   void interpolateToEnd(Vector3f targetLoc, Vector3f targetView);
   void circleAround();
   */

   void moveAutoCamera(float deltaTime);

   void switchCamToOne();
   void switchCamToTwo();


};
#endif
