BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
mouse_data.h
Go to the documentation of this file.
1/* This file is part of BlosSOM.
2 *
3 * Copyright (C) 2021 Sona Molnarova
4 *
5 * BlosSOM is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free
7 * Software Foundation, either version 3 of the License, or (at your option)
8 * any later version.
9 *
10 * BlosSOM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * BlosSOM. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef MOUSE_DATA_H
20#define MOUSE_DATA_H
21
22#include <glm/glm.hpp>
23
24/**
25 * @brief Mouse events data storage.
26 *
27 */
29{
30 /** Left, right or middle button.*/
31 int button;
32 /** Pressed, released or held button.*/
33 int action;
34
35 /** Offset of the mouse wheel along x-axis.*/
36 double xoffset;
37 /** Offset of the mouse wheel along y-axis.*/
38 double yoffset;
39
40 /** Raw mouse cursor coordinates on the screen
41 * ([0,0] in the upper left corner).
42 * Have to convert it to coordinates with [0,0] in the middle
43 * of the screen.
44 */
45 glm::vec2 pos;
46
48
49 void reset()
50 {
51 button = -1;
52 xoffset = 0;
53 yoffset = 0;
54 }
55};
56
57#endif // #ifndef MOUSE_DATA_H
Mouse events data storage.
Definition: mouse_data.h:29
double xoffset
Offset of the mouse wheel along x-axis.
Definition: mouse_data.h:36
glm::vec2 pos
Raw mouse cursor coordinates on the screen ([0,0] in the upper left corner).
Definition: mouse_data.h:45
void reset()
Definition: mouse_data.h:49
int action
Pressed, released or held button.
Definition: mouse_data.h:33
int button
Left, right or middle button.
Definition: mouse_data.h:31
double yoffset
Offset of the mouse wheel along y-axis.
Definition: mouse_data.h:38