/*
 *  FSGoal.cpp
 *  FeatheredSoccer
 *
 *  Created by Ludovico Rossi on 14/09/04.
 *  Copyright 2004 __MyCompanyName__. All rights reserved.
 *
 */

#include "FSGoal.h"


void FSGoal::Draw()
{
	glPushMatrix();
	
		glTranslatef(position.x,position.y,position.z);
		
		if(position.z > -9500.0)
			glRotatef(180.0, 0.0, 1.0, 0.0);
		
		glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		glColor4f(0.5, 0.7, 0.5, 0.6);
		
		glBegin(GL_QUADS);
			/*glVertex3f(0, 0, 0);
			glVertex3f(0, 1000, 0);
			glVertex3f(2000, 1000, 0);
			glVertex3f(2000, 0, 0);
			*/
			glVertex3f(0.0, 0.0, -1000.0);
			glVertex3f(0.0, 1000.0, -1000.0);
			glVertex3f(2000.0, 1000.0, -1000.0);
			glVertex3f(2000.0, 0.0, -1000.0);
			
			glVertex3f(0.0, 0.0, -1000.0);
			glVertex3f(0.0, 1000.0, -1000.0);
			glVertex3f(0.0, 1000.0, 0.0);
			glVertex3f(0.0, 0.0, 0.0);
			
			glVertex3f(2000.0, 0.0, -1000.0);
			glVertex3f(2000.0, 1000.0, -1000.0);
			glVertex3f(2000.0, 1000.0, 0.0);
			glVertex3f(2000.0, 0.0, 0.0);
			
			glVertex3f(0.0, 1000.0, 0.0);
			glVertex3f(0.0, 1000.0, -1000.0);
			glVertex3f(2000.0, 1000.0, -1000.0);
			glVertex3f(2000.0, 1000.0, 0.0);
		glEnd();
		
		glDisable(GL_BLEND);
	//model.DrawGoal();
	
	glPopMatrix();
	
	return;
}

void FSGoal::Load()
{
	//model.LoadObj("goal.obj", 1.0);
}


void FSGoal::Unload()
{
	//model.DeleteModel();
}

