
#ifndef __KALIBRACE_H__
#define __KALIBRACE_H__
//#include "stdafx.h"
#include <iostream>
#include "Dif_evol.h"
#include "Teleso.h"
#include "Projekce.h"

//namespace KamKalib
//{
#define uhel 1.6
class Kalibrace: public Diferencialni 
{
protected: 
	Zobraz Q;
	Teleso Item;
	virtual double Fitness(double* A);
public:
	Kalibrace();
	~Kalibrace();
	inline void SetDisplayedPoint(int x,int y,int cislo);
	inline void BlockAsObject(double a,double b, double c);
	inline void AddObjectPoint(double a,double b, double c);
	inline void SetObject(Teleso X);
	inline void SetCenterOfImage(double x, double y);
	inline int GetCountObjectPoints();
	inline int GetDisplayedPointX(int cislo);
	inline int GetDisplayedPointY(int cislo);

};

	
	int Kalibrace::GetDisplayedPointX(int cislo)
	{
		Bod X = Item.GetBod(cislo);
		return X.ZobrX;
	}

	int Kalibrace::GetDisplayedPointY(int cislo)
	{
		Bod X = Item.GetBod(cislo);
		return X.ZobrY;
	}

	void Kalibrace::SetObject(Teleso X)
	{
		Item = X;
	}
	void Kalibrace::AddObjectPoint(double x,double y, double z)
	{
		Item.Add(x,y,z);
		this->Start_Evoluce();
	}

	void Kalibrace::SetDisplayedPoint(int x, int y, int cislo){Item.SetZobr(x,y,cislo); }

	void Kalibrace::BlockAsObject(double a, double b, double c)
	{
		Teleso Block(a,b,c);
		Item= Block;
		this->Start_Evoluce();
	}

	void Kalibrace::SetCenterOfImage(double x,double y) {Q.SetCxy(x,y);};
	int Kalibrace::GetCountObjectPoints() {return Item.GetCount();}
//}
#endif 