MCPcopy Create free account
hub / github.com/RenderKit/embree / motionFunc

Method motionFunc

tutorials/common/tutorial/tutorial.cpp:865–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863 }
864
865 void TutorialApplication::motionFunc(GLFWwindow* window, double x, double y)
866 {
867 ImGui_ImplGlfw_CursorPosCallback(window, x, y);
868 if (ImGui::GetIO().WantCaptureMouse) return;
869
870 float dClickX = float(clickX - x), dClickY = float(clickY - y);
871 clickX = x; clickY = y;
872
873 switch (mouseMode) {
874 case 1: camera.rotateOrbit(-0.005f*dClickX,0.005f*dClickY); break;
875 case 2: break;
876 case 3: camera.dolly(-dClickY); break;
877 case 4: camera.rotate(-0.005f*dClickX,0.005f*dClickY); break;
878 }
879 }
880
881 void TutorialApplication::displayFunc()
882 {

Callers 1

motionFuncFunction · 0.80

Calls 4

rotateOrbitMethod · 0.80
dollyMethod · 0.80
rotateMethod · 0.45

Tested by

no test coverage detected