123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #pragma once
- #include "CMatrixCommon.h"
- namespace ns_mat
- {
- struct MatrixPointInfo
- {
- int nDieRow = 0;
- int nDieCol = 0;
- int iDieIndex = 0;
- bool bDisable = 0;
- XY_DOUBLE_STRUCT stPosition{ 0,0 };
- };
- class __declspec(dllexport) OneDimMatrix
- {
- public:
- OneDimMatrix();
- ~OneDimMatrix();
- LONG LoadMatrix(int matriId, MATRIX_SEARCH_DIR dir);
- LONG GetPointInfo(int index, MatrixPointInfo& pointInfo);
- LONG GetPointInfo(int row, int col, MatrixPointInfo& pointInfo);
- LONG GetPointPosition(int index, XY_DOUBLE_STRUCT& position);
- LONG GetPointPosition(int row, int col, XY_DOUBLE_STRUCT& pointInfo);
- int GetAmount() { return m_nAmount; };
- private:
- void Sort_Z();
- void Sort_S();
- private:
- OneDimMatrixInfo m_stMatrixInfo;
- std::map<int, MatrixPointInfo> m_mapMatrixInfo;
- CProduct* m_pCProduct = nullptr;
- static std::mutex m_MatrixMutex;
- bool bIsInitSuccess = false;
- int m_nMartixID = 1;
- int m_nAmount = 0;
- };
- }
|