#ifndef _GEOMETRY_H_
#define _GEOMETRY_H_

#include "trig.h"

class CVertex : public CVector
{
public:
	CVector normal;
};

class CTriangle
{
public:
	unsigned int v[3];
	unsigned int tv[3];
	CVector normal;	
};

class CTvertex
{
public:
	double u, v;
};

class CGeometry
{
private:
	unsigned int vertices;
	CVertex *vertex;
	unsigned int tvertices;
	CTvertex *tvertex;
	unsigned int triangles;
	CTriangle *triangle;
public:
	CGeometry(void);
	CGeometry(unsigned int v, unsigned int tv, unsigned int t);
	CGeometry(const char* f);
	~CGeometry(void);
	
	void scale(double s);
	void draw(void);
	void calc_normals(void);
};

#endif
