#pragma once

#include "robbase.h"
 

class ROBBASE_API CAxes
{
public:
	CAxes(void);
	virtual ~CAxes(void);

	void  Make(WORD axis);
	void  MakeXY(WORD axisX, WORD axisY);
	void  MakeXYZ(WORD axisX, WORD axisY, WORD axisZ);
	void  MakeXYZR(WORD axisX, WORD axisY, WORD axisZ, WORD axisR);
	 
	//任意轴组合，用于4轴以上。
	void SetAxisCount(int count);
	void SetAxisAt(int index, WORD axis);


	inline int GetAxisCount(){ return m_nAxisCount; };
	inline WORD GetAxisAt(int index){ 
		if (index >=0 && index < m_nAxisCount) return m_arrAxes[index]; 
		else return 0;
	};


	CAxes& operator=(const CAxes& axes);
	CAxes& operator=(WORD axis);
	CAxes& operator=(int axis);

	WORD&  operator[](int index);

public:
	DWORD   m_nCoordId; //坐标系ID，前瞻站号等
private:
	int   m_nAxisCount;
	WORD  m_arrAxes[ROB_MAX_AXIS_COUNT];
	

};

