
#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 3.14
class Kalibrace: public Diferencialni 
{
private: 
	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;
		changed = true;
	}
	void Kalibrace::AddObjectPoint(double x,double y, double z)
	{
		Item.Add(x,y,z);
		changed = true;
	}

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

	void Kalibrace::BlockAsObject(double a, double b, double c)
	{
		Teleso Block(a,b,c);
		Item= Block;
		changed = true;
	}

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