import java.awt.*;
import java.awt.image.*;
import java.lang.*;


public class Camera
{

//Position
    private double posX, posY, posZ;

//Vitesse
    private double vTangente, vPerpY, vPerpXZ;

//Position orientation
    private double rotY, rotXZ;

//Distance a l'ecran de projection
    private int fov;

//Limite de la vision
    private int farDistance;

//Debut du brouillard
    private int fogDistance;
	
    
    
    public void init( double X, double Y, double Z,
        double vt, double vpY, double vpXZ,
        double rY, double rXZ,
        int f,
        int farDist,
        int fogDist)
    {
        posX = X;
        posY = Y;
        posZ = Z;

        vTangente = vt;
        vPerpY = vpY;
        vPerpXZ = vpXZ;

        rotY = rY;
        rotXZ = rXZ;

        fov = f;
        farDistance = farDist;
        fogDistance = fogDist;
	}

    public void update()
    {
        posX+=Math.cos(rotXZ)*Math.cos(rotY)*vTangente;
        posZ+=Math.cos(rotXZ)*Math.sin(rotY)*vTangente;
        posY+=Math.sin(rotXZ)*vTangente;

		rotY+=vPerpY;
		rotXZ+=vPerpXZ;
    }

	public double getX()
    {
		return posX;
	}

	public double getY()
    {
		return posY;
	}

	public double getZ()
    {
		return posZ;
	}

	public double getRY()
    {
		return rotY;
	}

	public double getRXZ()
    {
		return rotXZ;
	}

	public int getFOV()
    {
		return fov;
	}

	public int getFarDistance()
    {
		return farDistance;
	}

	public int getFogDistance()
    {
		return fogDistance;
	}
}