/*
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 demonstates splitting operations on meshes (dividing a mesh up into two regions according
to some rule.
*/
class MainControl {
public:
~MainControl() {FreeMemory();}
void FreeMemory();
void InitShapes(GraphicsDevice &GD); //initalizes the shape ring
void CutShapes(GraphicsDevice &GD); //cut the shapes according to the selected function
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 CutType; //the type of cut to perform
Vector<Mesh> ShapesUnCut; //the origional shapes
Vector<Mesh> ShapesCut; //the cut shapes we're drawing
MatrixController MC; //the world/view/perspective matrices
Camera C; //the camera we use
float Time; //the current time, in seconds
};