| 46 | } |
| 47 | |
| 48 | void PickingSystem::processRect(glm::ivec2 start, glm::ivec2 end, bool cumulative) { |
| 49 | if (!cumulative) { |
| 50 | clearSelection(); |
| 51 | } |
| 52 | BaseRenderer* rend = renderer->get(); |
| 53 | |
| 54 | for (size_t i = 0; i < atomStorage->size(); ++i) { |
| 55 | const glm::vec3 worldPos = displayAtomPos(i); |
| 56 | const glm::ivec2 atomScreen{rend->camera.worldToScreen(worldPos)}; |
| 57 | if (pointInRect(atomScreen, start, end)) { |
| 58 | selectedAtomIds.insert(atomStorage->atomId(i)); |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void PickingSystem::processLasso(std::span<glm::ivec2> points, bool cumulative) { |
| 64 | if (points.size() < 3) { |
no test coverage detected