MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / processRect

Method processRect

App/interaction/picking/PickingSystem.cpp:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void 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
63void PickingSystem::processLasso(std::span<glm::ivec2> points, bool cumulative) {
64 if (points.size() < 3) {

Callers 2

finishRectMethod · 0.80
onLeftReleasedMethod · 0.80

Calls 4

atomIdMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45
worldToScreenMethod · 0.45

Tested by

no test coverage detected