/*
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 3 shapes in a ring with a texture on them, and slowly rotates the shapes.
*/
class MainControl {
public:
~MainControl() {FreeMemory();}
void FreeMemory();
void InitShapes(GraphicsDevice &GD); //initalizes the shape ring
void InitTextures(GraphicsDevice &GD); //initalizes the textures
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:
int CurTexture; //the current texture to render
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
Vector<Texture> Textures; //the textures we're rendering with
Vector<Mesh> 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
};