| 259 | } |
| 260 | |
| 261 | void SegmentSelection::computeRasterizedLine() |
| 262 | { |
| 263 | if (!valid) { |
| 264 | return; |
| 265 | } |
| 266 | |
| 267 | sibr::Vector2i diff = secondPosIm - firstPosIm; |
| 268 | int l = diff.cwiseAbs().maxCoeff(); |
| 269 | rasterizedLine.resize(l + 1); |
| 270 | for (int i = 0; i <= l; ++i) { |
| 271 | rasterizedLine[i] = (firstPosIm.cast<float>() + (i / (float)l)*diff.cast<float>()).cast<int>(); |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | void DisplayImageGui( |
| 276 | GLuint texture, |