// KinematicsBasicMapping.h: interface for the CKinematicsBasicMapping class.
//
//////////////////////////////////////////////////////////////////////

// **** what is this value???
#if !defined(AFX_KINEMATICSBASICMAPPING_H__876A0A72_6EC3_48D0_9040_60AE3DA2F3C7__INCLUDED_)
#define AFX_KINEMATICSBASICMAPPING_H__876A0A72_6EC3_48D0_9040_60AE3DA2F3C7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "stdafx.h"

class CKinematicsBasicMapping : public CKinematics
{
public:

	double XmapInc = 0;
	double YmapInc = 0;
	double ZmapInc = 0;
	double AmapInc = 0;
	double BmapInc = 0;
	double CmapInc = 0;
	double _MaxLinearLength = 0.0;
	double walkDistance = 0.1;
	int walkIterations = 100;  // **** this is more for testing than needed later.  Should remove later
	bool XmapValid = false;
	bool YmapValid = false;
	bool ZmapValid = false;
	bool AmapValid = false;
	bool BmapValid = false;
	bool CmapValid = false;
	double* XscrewMap; // array pointers
	double* YscrewMap;
	double* ZscrewMap;
	double* AscrewMap;
	double* BscrewMap;
	double* CscrewMap;
	int XmapNrows;
	int YmapNrows;
	int ZmapNrows;
	int AmapNrows;
	int BmapNrows;
	int CmapNrows;
	double XmapOffset;
	double YmapOffset;
	double ZmapOffset;
	double AmapOffset;
	double BmapOffset;
	double CmapOffset;
	CKinematicsBasicMapping();
	virtual ~CKinematicsBasicMapping();
	int Initialize();
	double mapDouble(double startVal, double in_min, double in_max, double out_min, double out_max);
	virtual int TransformCADtoActuators(double x, double y, double z, double a, double b, double c, double *Acts, bool NoGeo = false);
	virtual int TransformActuatorstoCAD(double *Acts, double *x, double *y, double *z, double *a, double *b, double *c, bool NoGeo = false);
	int ReadScrewData(const char *name, int *screwMapNrows, double *mapInc, double *offset, char axis, bool *ScrewMapValid);
	int InvertTransformCADtoActuators(double *Acts, double *xr, double *yr, double *zr, double *ar, double *br, double *cr, bool NoGeo);
};
// **** update or clean this line to to whatever needed above
#endif // !defined(AFX_KINEMATICSBASICMAPPING_H__876A0A72_6EC3_48D0_9040_60AE3DA2F3C7__INCLUDED_)
