#include "project_volumes.h"
#include "data_volumes.h"

Cvolume *volumes[VOL_NUM];

void GenVolume(int type)
{
	switch(type)
	{
		case VOL_PLASMA1:
			volumes[type] = new Cvolume(128, 128, 128);
			volumes[type]->GenVolume(VGEN_PLASMA);
		break;

		case VOL_FX:
			volumes[type] = new Cvolume(128, 128, 128);
			volumes[type]->GenVolume(VGEN_EMPTY);
		break;

		case VOL_SPHERE1:
			volumes[type] = new Cvolume(256, 256, 256);
			volumes[type]->GenVolume(VGEN_SPHERE);
		break;

		case VOL_BUNNY:
			volumes[type] = new Cvolume(512, 512, 361);
//			volumes[type]->LoadVolume("./data/volumes/bunny.bin");
		break;



		default:
		break;
	}
}

void InitVolume(int type)
{
	if (volumes[type]==NULL)
	{
		GenVolume(type);
	}
}

void InitAllVolumes()
{
	for (int i=0; i<VOL_NUM; i++)
	{
		InitVolume(i);
	}
}