MeshLib Documentation
Loading...
Searching...
No Matches
MRMouse.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4
5namespace MR
6{
7
8enum class MouseButton
9{
10 Left = 0, // GLFW_MOUSE_BUTTON_1
11 Right = 1, // GLFW_MOUSE_BUTTON_2
12 Middle = 2, // GLFW_MOUSE_BUTTON_3
13 Count,
15};
16
17// Standard mouse functions for camera control
18enum class MouseMode
19{
20 None,
21 Rotation, // Rotate camera around selected point
22 Translation, // Translate camera preserving its direction
23 Roll, // Rotate camera around axis orthogonal to screen
24 Count
25};
26
27inline std::string getMouseModeString( MouseMode mode )
28{
29 constexpr std::array<const char*, size_t( MouseMode::Count )> names =
30 {
31 "None",
32 "Rotation",
33 "Translation",
34 "Roll"
35 };
36 return names[int( mode )];
37}
38
39} //namespace MR
@ None
special value not to limit path in one slice
Definition MRVoxelPath.h:33
Definition MRCameraOrientationPlugin.h:8
MouseMode
Definition MRMouse.h:19
MouseButton
Definition MRMouse.h:9
std::string getMouseModeString(MouseMode mode)
Definition MRMouse.h:27
@ Right
Definition MRSymbolMesh.h:18
@ Left
Definition MRSymbolMesh.h:16