ALBA
mmiVTKPicker.h
Go to the documentation of this file.
1/*=========================================================================
2 Program: Multimod Application Framework RELOADED
3 Module: $RCSfile: mmiVTKPicker.h,v $
4 Language: C++
5 Date: $Date: 2012-04-06 08:39:52 $
6 Version: $Revision: 1.1.2.5 $
7 Authors: Josef Kohout (Josef.Kohout *AT* beds.ac.uk)
8 ==========================================================================
9 Copyright (c) 2009 University of Bedfordshire (www.beds.ac.uk)
10 See the COPYINGS file for license details
11 =========================================================================
12*/
13
14#ifndef mmiVTKPicker_h__
15#define mmiVTKPicker_h__
16
17//----------------------------------------------------------------------------
18// Include:
19//----------------------------------------------------------------------------
20#include "albaDefines.h"
22
23//----------------------------------------------------------------------------
24// Forward declarations:
25//----------------------------------------------------------------------------
26class vtkCellPicker;
27
55class ALBA_EXPORT mmiVTKPicker : public albaInteractorCameraMove
56{
57public:
60
62 inline void SetContinuousPicking(bool bValue) {
63 m_ContinuousPicking = bValue;
64 }
65
67 inline bool GetContinuousPicking() {
68 return m_ContinuousPicking;
69 }
70
72 virtual void OnMouseMove();
73
76
78 virtual void OnLeftButtonUp();
79
80protected:
83 m_ContinuousPicking = false;
84 m_Picker = NULL;
85 }
87 virtual ~mmiVTKPicker();
88
89protected:
90 vtkCellPicker* m_Picker; //<picker to be used for the picking
91 bool m_ContinuousPicking; //<true, if events are sent during mouse move
92};
93
94#endif // mmiVTKPicker_h__
Event class to transport a triggering button and a position from pointing devices.
implements mouse move of camera in the scene.
class name: mmiVTKPicker Implements mouse move of camera in the scene or perform continuous cell pick...
Definition: mmiVTKPicker.h:56
virtual ~mmiVTKPicker()
destructor
bool m_ContinuousPicking
Definition: mmiVTKPicker.h:91
void SetContinuousPicking(bool bValue)
Enables/disables continuous picking.
Definition: mmiVTKPicker.h:62
albaTypeMacro(mmiVTKPicker, albaInteractorCameraMove)
RTTI macro.
virtual void OnLeftButtonUp()
redefined to end pick modality
bool GetContinuousPicking()
Enables/disables continuous picking.
Definition: mmiVTKPicker.h:67
mmiVTKPicker()
constructor
Definition: mmiVTKPicker.h:82
virtual void OnLeftButtonDown(albaEventInteraction *e)
redefined to pick cell if CTRL modifier is pressed
virtual void OnMouseMove()
redefined not to move the camera if something has been picked
vtkCellPicker * m_Picker
Definition: mmiVTKPicker.h:90