| 75 | } |
| 76 | |
| 77 | void Widget::setTransform(MatrixHashMap& pMap, const float pX, const float pY, const glm::mat4 &pMat) |
| 78 | { |
| 79 | for (auto it: pMap) { |
| 80 | const CellIndex& idx = it.first; |
| 81 | |
| 82 | const int rows = std::get<0>(idx); |
| 83 | const int cols = std::get<1>(idx); |
| 84 | |
| 85 | const int cellWidth = mWidth/cols; |
| 86 | const int cellHeight = mHeight/rows; |
| 87 | |
| 88 | const int x = int(pX) / cellWidth; |
| 89 | const int y = int(pY) / cellHeight; |
| 90 | const int i = x + y * cols; |
| 91 | if (i==std::get<2>(idx)) { |
| 92 | pMap[idx] = pMat; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void Widget::setCellViewMatrix(const float pXPos, const float pYPos, const glm::mat4& pMatrix) |
| 98 | { |
nothing calls this directly
no outgoing calls
no test coverage detected