#ifndef _MODEL_H
#define _MODEL_H
#include "vec.h"
#include "poly.h"
#include <string>
class Model : public Thing {
private:
std::vector<Poly*> faces;
Vec* position;
Vec* rotation;
float delta;
bool drawMe;
public:
Model();
Model(std::vector<Poly*> & _faces);
~Model();
void setCenter(Vec& c);
void setCenter(Vec* c);
void setPosition(Vec c);
void setPosition(Vec* c);
Vec calcCenter();
void rotate(Vec rot);
void draw();
void addFace(Poly* face);
int numFaces();
void vardump(std::string whitespace);
void setDelta(float d);
void setMaterial(Color ambient, Color specular);
float getDelta();
void showNormals();
void hideNormals();
Model* clone();
void setColor(Color* c);
void show();
void hide();
void translate(Vec d);
void scale(float f);
};
#endif
class GluModel : public Thing {
public:
GLUquadricObj* pt;
Vec* pos;
Vec* rot;
Material* mat;
float scale;
bool enabled;
GluModel();
GluModel(Vec _pos, Material _mat);
void init(Vec _pos, Material _mat);
void setMaterial(Color _amb);
void setMaterial(Color _amb, Color _spec);
};
class GluSphere : public GluModel {
public:
float rad;
GluSphere();
GluSphere(Vec _pos, Material _mat, float _rad);
void init(Vec _pos, Material _mat, float _rad);
void draw();
};