MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / handleMouseButton

Method handleMouseButton

apps/Viewer/ArcballControls.cpp:79–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void ArcballControls::handleMouseButton(int button, int action, const Eigen::Vector2d& pos) {
80 switch (action) {
81 case GLFW_PRESS:
82 isDragging = true;
83 dragButton = button;
84 lastMousePos = pos;
85 startMousePos = pos;
86 // Determine operation based on mouse action
87 currentState = getOpFromAction(button, 0);
88 if (enableGizmos)
89 gizmosActive = true;
90 break;
91
92 case GLFW_RELEASE:
93 isDragging = false;
94 dragButton = -1;
95 currentState = STATE_IDLE;
96 if (enableGizmos)
97 gizmosActive = false;
98 }
99}
100
101void ArcballControls::handleMouseMove(const Eigen::Vector2d& pos) {
102 if (!isDragging)

Callers 1

HandleMouseButtonMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected