MeshLib Documentation
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::None
@ None
special value not to limit path in one slice
Definition
MRVoxelPath.h:33
MR
Definition
MRCameraOrientationPlugin.h:8
MR::Axis::Count
@ Count
MR::MouseMode
MouseMode
Definition
MRMouse.h:19
MR::MouseMode::Roll
@ Roll
MR::MouseMode::Translation
@ Translation
MR::MouseMode::Count
@ Count
MR::MouseMode::Rotation
@ Rotation
MR::MouseButton
MouseButton
Definition
MRMouse.h:9
MR::MouseButton::Middle
@ Middle
MR::MouseButton::NoButton
@ NoButton
MR::getMouseModeString
std::string getMouseModeString(MouseMode mode)
Definition
MRMouse.h:27
MR::Right
@ Right
Definition
MRSymbolMesh.h:18
MR::Left
@ Left
Definition
MRSymbolMesh.h:16
MeshLib
source
MRViewer
MRMouse.h
Generated by
1.11.0