///////////////////////// vertex normal calculation taken from max sdk

class VNormal 
{
public:
	Point3 norm;
	DWORD smooth;
	int faceid;
	VNormal *next;
	BOOL init;

	VNormal() {smooth=0;next=NULL;init=FALSE;norm=Point3(0,0,0);faceid=-1;}
	VNormal(Point3 &n,DWORD s,int facei) {next=NULL;init=TRUE;norm=n;smooth=s;faceid=facei;}
	~VNormal() {delete next;}
	void AddNormal(Point3 &n,DWORD s,int facei);
	Point3 &GetNormal(DWORD s, int facei);
	void Normalize();
};
void ComputeVertexNormals(Matrix3 nt, Mesh *mesh, Tab<VNormal> &vnorms, Tab<Point3> &fnorms);
