/* MainControl.h Written by Matthew Fisher MainControl includes everything that changes often between applications, such as what meshes to load, and also determines what is rendered each frame. This MainControl class just draws a ring of shapes, and slowly rotates these shapes in pseudo-random ways. */ class MainControl { public: ~MainControl() {FreeMemory();} void FreeMemory(); void InitShapes(GraphicsDevice &GD); //initalizes the shape ring void ReInit(GraphicsDevice &GD, WindowManager &WM); //called after we lose focus, telling us to restore //our textures and other data that may have been list void Init(GraphicsDevice &GD, WindowManager &WM); //called only one at the beginning of our application void Render(GraphicsDevice &GD, WindowManager &WM); //called each frame private: Vec3 TotalRotation; //the current rotation applied to the ring of shapes int CurrentVariable; //the current variable we're rotating float SecondsUntilSwitch; //the seconds left until we change CurrentVariable int Refinement; //the refinement of the shapes Vector Shapes; //the shapes we're drawing MatrixController MC; //the world/view/perspective matrices Camera C; //the camera we use float Time; //the current time, in seconds };