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

Method screenToLocalWorld

App/interaction/tools/ITool.cpp:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36glm::vec3 ITool::screenToLocalWorld(glm::ivec2 mousePos) const {
37 glm::vec3 worldPos = screenToWorld(mousePos);
38 if (context_.simulation != nullptr) {
39 worldPos -= context_.simulation->world().getRenderOffset();
40 }
41 return worldPos;
42}
43
44glm::ivec2 ITool::worldToScreen(glm::vec3 worldPos) const {
45 if (BaseRenderer* renderer = context_.activeRenderer(); renderer != nullptr) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected