fw4spl
PickingInfo.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2015-2016.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWDATATOOLS_PICKINGINFO_HPP__
8 #define __FWDATATOOLS_PICKINGINFO_HPP__
9 
10 #include "fwDataTools/config.hpp"
11 
12 #include <fwCore/HiResClock.hpp>
13 
14 #include <cstdint>
15 
16 namespace fwDataTools
17 {
18 
21 {
22  enum Modifier
23  {
24  NONE = 0,
25  CTRL = 1,
26  SHIFT = 2,
27  };
28 
29  enum class Event : std::int8_t
30  {
31  MOUSE_LEFT_UP = 0,
32  MOUSE_RIGHT_UP,
33  MOUSE_MIDDLE_UP,
34  MOUSE_WHEELFORWARD,
35  MOUSE_LEFT_DOWN,
36  MOUSE_RIGHT_DOWN,
37  MOUSE_MIDDLE_DOWN,
38  MOUSE_WHEELBACKWARD,
39  MOUSE_MOVE,
40  KEY_PRESS,
41  };
42 
44  double m_worldPos[3];
46  int m_cellId = -1;
48  int m_closestPointId = -1;
50  Event m_eventId = Event::MOUSE_LEFT_UP;
52  std::int8_t m_modifierMask = 0;
54  char m_keyPressed = 0;
55 
57 
58  FWDATATOOLS_API PickingInfo();
59 
60 };
61 
62 }
63 
64 #endif // __FWDATATOOLS_PICKINGINFO_HPP__
65 
double m_worldPos[3]
Position clicked in world coordinates.
Definition: PickingInfo.hpp:44
The namespace fwDataTools contains classes which provide helpers to manipulate fwData::Object. *.
int m_closestPointId
Id of the closest point.
Definition: PickingInfo.hpp:48
std::int8_t m_modifierMask
Modifier mask.
Definition: PickingInfo.hpp:52
double HiResClockType
Type returned by HiResClock Functions.
Definition: HiResClock.hpp:29
Structure to store picking information.
Definition: PickingInfo.hpp:20
char m_keyPressed
Key event.
Definition: PickingInfo.hpp:54
Event m_eventId
Mouse event.
Definition: PickingInfo.hpp:50
int m_cellId
Id of the cell.
Definition: PickingInfo.hpp:46