//	Original Author: Mark Dehus
//	Description:	Projectile management class. 
//					Calculates projectile position based on time

//	Copyright (C) 2005 Mark Dehus

//	This program is free software; you can redistribute it and/or
//	modify it under the terms of the GNU General Public License
//	as published by the Free Software Foundation; either version 2
//	of the License, or (at your option) any later version.

//	For more information about this project and gpl see readme.htm

//	RECENT MODIFICATIONS:

namespace Physics 
{
	class Projectile
	{
		public:
			Projectile();
			Projectile::Projectile(double currentTime, double gravity);
			Projectile(double initVelocity, double initHeight, double currentTime, double gravity);
			Projectile(double initVelocity, double initHeight, double direction, double angle, double currentTime, double gravity);
			double getPositionX(double timeStep);
			double getPositionZ(double timeStep);
			double getPositionHeight(double timeStep);
			bool isActive();
			void enable();
			void disable();
			void setDirection(double directionDegree);
			void setAngle(double angleDegree);
			void setInitVelocity(double velocity);
			void setInitHeight(double height);
			void setGravity(double gravity);

		private:
			double startTime, direction, angle;
			double initVelocity, initHeight, gravity;
			bool active;
			double adjustTime(double currentTime);
	};
}
