#include <../source/TAL/objbase.h>
#include <../source/PAL/dataman.h>

/*
 * Draws wireframe box with given corners
 */
void V_GLOBAL
bboxDraw(vec3_t mins,vec3_t maxs)
{
	glBegin(GL_LINE_LOOP);
		glVertex3f(maxs[0],maxs[1],mins[2]);
		glVertex3f(mins[0],maxs[1],mins[2]);
		glVertex3f(mins[0],mins[1],mins[2]);
		glVertex3f(maxs[0],mins[1],mins[2]);
	glEnd(); /* GL_LINE_LOOP */
	glBegin(GL_LINE_LOOP);
		glVertex3f(maxs[0],maxs[1],maxs[2]);
		glVertex3f(mins[0],maxs[1],maxs[2]);
		glVertex3f(mins[0],mins[1],maxs[2]);
		glVertex3f(maxs[0],mins[1],maxs[2]);
	glEnd(); /* GL_LINE_LOOP */
	glBegin(GL_LINES);
		glVertex3f(maxs[0],maxs[1],mins[2]);
		glVertex3f(maxs[0],maxs[1],maxs[2]);
		glVertex3f(mins[0],maxs[1],mins[2]);
		glVertex3f(mins[0],maxs[1],maxs[2]);
		glVertex3f(mins[0],mins[1],mins[2]);
		glVertex3f(mins[0],mins[1],maxs[2]);
		glVertex3f(maxs[0],mins[1],mins[2]);
		glVertex3f(maxs[0],mins[1],maxs[2]);
	glEnd(); /* GL_LINES */
}

