#include "StdAfx.h"
#include "IndexColor.h"


int IndexColor::NumColorCycles(void)
{
	return 6;
}

lib_graph::color4f IndexColor::GetColor(int idx)
{
	switch(idx % NumColorCycles())
	{
	case 0: return lib_graph::color4f(1, 0, 0, 1); break;
	case 1: return lib_graph::color4f(0, 1, 0, 1); break;
	case 2: return lib_graph::color4f(0, 0, 1, 1); break;
	case 3: return lib_graph::color4f(1, 1, 0, 1); break;
	case 4: return lib_graph::color4f(1, 0, 1, 1); break;
	case 5: return lib_graph::color4f(0, 1, 1, 1); break;
	default:
		assert(false);
		return lib_graph::color4f(0, 0, 0, 0);
	}
}
