/** * CS798 Project - design.hpp * April 21, 2006 * * Erika Harrison */ #ifndef CS798_DESIGN_HPP #define CS798_DESIGN_HPP #include "algebra.hpp" #include "layer.hpp" #include "const.hpp" #include using namespace std; // stores a Design object, and methods for drawing class Design { public: Design(); // constructor -- pass in params ~Design(); // deconstructor // draws all the layerings on the design void draw(Const::MathMode mM, Const::ViewMode vM); // draws the design void drawLayer(Layer * l, Const::MathMode mM, Const::ViewMode vM); // draws a layer // param settings void setA(double A); void setB(double B); void setC(double C); void setD(double D); void setE(double E); void setF(double F); void setG(double G); void setH(double H); void sett(double t); void settInc(double tI); void setColour(Colour c); void setWidth(int w); void setBG(Colour c) { m_bg = c; } // allow us to work with multiple layers void addLayer() { layers.push_back(new Layer()); sellayer = layers.size() - 1; updateSelection(); } void deleteLayer(); // deletes the selected layer void rotateLayer(char axis, double angle) { layers[sellayer]->rotateLayer(axis, angle); } // TODO //void reset(); private: // layers vector layers; int sellayer; // background colouring Colour m_bg; // used for updating the selection menu void updateSelection(); // converts unit circle point to an egg shape void eggify(Vector3D & point); void vertex(Vector3D v); // helper print out sphere normal, egg vertex }; #endif