Newer
Older
cg / include / model.h
#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);
		virtual ~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