#include "include.h"


Bala::Bala() {
	this->vel = 0;
	this->radio = 0.2;
}

Bala::Bala(Vector3D pos, Vector3D front, double vel) {
	this->pos = pos;
	this->front = front;
	this->vel = vel;
	this->radio = 0.2;
}

void Bala::update() {
	this->pos += this->front * val(this->vel);
}

void Bala::draw() {
	glEnable(GL_DEPTH_TEST);
	glEnable(GL_CULL_FACE);

	glTranslated(this->pos.x, this->pos.y, this->pos.z);
	glColor4f(0, 1, 1.0, 1);
	glutSolidSphere(this->radio/3, 10, 10);
	glColor4f(0, 1, 1.0, 0.75);
	glutSolidSphere(this->radio/2, 10, 10);
	glColor4f(0, 1, 1.0, 0.5);
	glutSolidSphere(this->radio, 10, 10);
	glColor4f(0, 0.9, 1.0, 0.25);
	glutSolidSphere(this->radio*2, 10, 10);

	glDisable(GL_DEPTH_TEST);
	glDisable(GL_CULL_FACE);
}
