#pragma once

#include "robbase.h"


class ROBBASE_API CPos
{
public:
	CPos(void);
	CPos(double x);
	CPos(double x, double y);
	CPos(double x, double y, double z);
	 
	virtual ~CPos(void);

    void Set(double x, double y);
	void Set(double x, double y, double z);
	void Set(double x, double y, double z, double r);
	int Set(double* posArr, int count);


	 
	inline int GetPosCount(){ return m_nCount; };
	inline double GetPosAt(int index){ 
		if (index >=0 && index < m_nCount) return m_arrPos[index]; 
		else return 0;
	};
	inline void SetPosAt(int index, double pos){ 
		if (index >=0 && index < m_nCount) {
			m_arrPos[index] =pos; 
		}
	}

	CPos& operator=(const CPos& pos);
	CPos& operator=(double pos);

	double& operator[](int index);
protected:
	int     m_nCount;
	double  m_arrPos[ROB_MAX_AXIS_COUNT];

};

