/*
/ CAMERA.H
/ ********
/ Core camera interface class.
/
/ Will Beddow 2010 - http://343gs.com/brainstem
/
/ This software is currently under development
/ and is subject to change and improvement. Some
/ aspects of the system are incomplete and/or 
/ unstable due to ongoing implementation.
/
*/

#ifndef __CAMERA_H__
#define __CAMERA_H__

#include "Compile.h"
#include "Types.h"
#include "Matrix.h"

namespace Brainstem
{
	class ICamera : public IObject
	{
	public:
		virtual void Init() = 0;
		virtual void Update() = 0;

		virtual Matrix4<float> GetViewMatrix() = 0;
		virtual Matrix4<float> GetProjectionMatrix() = 0;

		virtual bool FrustumCubeTest(Vector3<float> min, Vector3<float> max) = 0;
		virtual bool FrustumSphereTest(Vector3<float> center, float radius) = 0;
		virtual bool FrustumBoxTest(Vector3<float> center, float size) = 0;
		virtual bool FrustumTest(Vector3<float> position) = 0;

		virtual Vector3<float> GetDirection() = 0;

		float Yaw;
		float Pitch;

		float AspectRatio;
		float FOV;
		float CullingFOV;
		float zNear;
		float zFar;

		float YawDelta;
		float PitchDelta;
		
		Vector3<float> Position;
		Vector3<float> Velocity;

		Vector3<float> Target;

		AUTO_OBJECT_SIZE;
		virtual const char* GetName() { return "Unknown Camera"; }

	protected:
		Matrix4<float> View;
		Matrix4<float> Projection;
	};
}

#endif