/***************************************************************************
 *   Copyright (C) 2004-2005 by                                            *
 *     Paolo Sacconier   <axa1981@tin.it>                                  *
 *     Francesco Tamagni <minchiahead@hacari.org>                          *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef GILLOCAMERATRACK_H
#define GILLOCAMERATRACK_H

#include "main.h"
#include "camera.h"
#include "field.h"

namespace gillo {

/**
@author $AUTHOR$
*/
class CameraTrack : public Camera
{
	static const float reference = 100.0/2.0*0.5;
	//static const float reference = 22.5*0.6;
	static const float vel = 0.05;
	static const float emph = 3.0;
	static const float measureMultiplier = 1.1;
	static const float angleX = 0.0;//-3.20;
	static const float angleY = 4.0;//0.90;

public:
	CameraTrack(Context& w, vector<Entity*> * es);
	
	~CameraTrack();
	
	virtual void update(float dt);
	
protected:
	vector<Entity*> t;
	sgVec3 direction;
	sgVec3 hpr;
	float *ctrl; 
	float *variance;
	void getTrackEntities(vector<Entity*> *es);
	void setCenter(float x, float y, float z);
	Context& world;
	vector<Entity*>* es;

};

};

#endif
