// PROGRAM INCLUDES
#include "mesh.h"
mesh::mesh()
{
	// Init all of the pointers
	vertices = 0;
	normals = 0;
	triangles = 0;
}

void mesh::initVertArray(long numVerts)
{
	if (numVerts > 0)
	{
		vertices = new vertex[numVerts];
		vertCount = numVerts;
	}
}

void mesh::initNormArray(long numNorm)
{
	if (numNorm > 0)
	{
		normals = new point[numNorm];
		normCount = numNorm;
	}
}

void mesh::initTriArray(long numTri)
{
	if (numTri > 0)
	{
		triangles = new triangle[numTri];
		triCount = numTri;
	}
}

mesh::~mesh()
{
	if (vertices != 0)
        delete [] vertices;
	if (normals != 0)
		delete [] normals;
	if (triangles != 0)
		delete [] triangles;
}
