MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMouse.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
5
namespace
MR
6
{
7
8
enum 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
,
14
NoButton =
Count
15
};
16
17
// Standard mouse functions for camera control
18
enum 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
27
inline
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
MR::UI::TextureType::Count
@ Count
MR
Definition
MRCameraOrientationPlugin.h:8
MR::getMouseModeString
std::string getMouseModeString(MouseMode mode)
Definition
MRMouse.h:27
MeshLib
source
MRViewer
MRMouse.h
Generated by
1.11.0