| 251 | } |
| 252 | |
| 253 | UV01 MultiViewInterface::screenPos(const PixPos & pix) |
| 254 | { |
| 255 | sibr::Vector2f pos = (pix.pos.cast<float>().cwiseQuotient(scalesData[currentScale].imSize) + |
| 256 | sibr::Vector2f(pix.im % grid.x(), pix.im / grid.x())).cwiseQuotient(grid.cast<float>()); |
| 257 | pos.y() = 1.0f - pos.y(); |
| 258 | return UV01::from((pos - viewRectangle.tl()).cwiseQuotient(viewRectangle.br() - viewRectangle.tl())); |
| 259 | } |
| 260 | |
| 261 | UV01 MultiViewInterface::screenPosPixelCenter(const PixPos & pix) |
| 262 | { |