ALBA
albaInteractorCameraMove.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaInteractorCameraMove
5 Authors: Paolo Quadrani & Marco Petrone
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaInteractorCameraMove_h
18#define __albaInteractorCameraMove_h
19
21{
28};
29
30
31
32#include "albaInteractor.h"
33#include "albaMTime.h"
34
35//----------------------------------------------------------------------------
36// forward declarations :
37//----------------------------------------------------------------------------
39class vtkCamera;
40
45class ALBA_EXPORT albaInteractorCameraMove : public albaInteractor
46{
47public:
49
52
54 virtual void OnEvent(albaEventBase *event);
55
56 virtual void OnMouseMove();
58 virtual void OnLeftButtonUp();
60 virtual void OnMiddleButtonUp();
62 virtual void OnRightButtonUp();
63
64 virtual void Rotate();
65 virtual void Spin();
66 virtual void Pan();
67 virtual void Dolly();
68
69 virtual void StartRotate();
70 virtual void EndRotate();
71 virtual void StartZoom();
72 virtual void EndZoom();
73 virtual void StartPan();
74 virtual void EndPan();
75 virtual void StartSpin();
76 virtual void EndSpin();
77 virtual void StartDolly();
78 virtual void EndDolly();
79
80 virtual void StartState(int newstate);
81 virtual void StopState();
82
83 void ResetClippingRange(); // to work with layers
84
87
88protected:
91
93
95
97
99 int m_State;
100
101 int m_MousePose[2];
102 int m_LastMousePose[2];
105 vtkCamera* m_CurrentCamera;
107 bool m_AutoResetClippingRange; // Turn on (default)-off the auto reset of clipping range
108
109private:
110 albaInteractorCameraMove(const albaInteractorCameraMove&); // Not implemented.
111 void operator=(const albaInteractorCameraMove&); // Not implemented.
112};
113#endif
@ MOUSE_CAMERA_PAN
@ MOUSE_CAMERA_SPIN
@ MOUSE_CAMERA_ZOOM
@ MOUSE_CAMERA_NONE
@ MOUSE_CAMERA_DOLLY
@ MOUSE_CAMERA_ROTATE
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
Event class to transport a triggering button and a position from pointing devices.
implements mouse move of camera in the scene.
virtual void StartSpin()
albaTypeMacro(albaInteractorCameraMove, albaInteractor)
virtual void OnEvent(albaEventBase *event)
Process events coming from tracker.
virtual void StopState()
virtual int StartInteraction(albaDeviceButtonsPadMouse *mouse)
Start the interaction with the selected object.
virtual void OnLeftButtonUp()
virtual void AutoResetClippingRangeOff()
virtual void EndDolly()
virtual void StartPan()
virtual void OnButtonUp(albaEventInteraction *e)
virtual ~albaInteractorCameraMove()
virtual void AutoResetClippingRangeOn()
virtual void OnMiddleButtonUp()
virtual void EndSpin()
albaMTime m_UpdateTime
Time stamp of the last update of the tracker to world transformation.
virtual void OnRightButtonUp()
virtual void OnButtonDown(albaEventInteraction *e)
vtkCamera * m_CurrentCamera
Stores camera to which the interaction is currently assigned.
virtual void OnMouseMove()
virtual void StartZoom()
virtual void OnRightButtonDown(albaEventInteraction *e)
virtual void EndRotate()
virtual void StartState(int newstate)
virtual void EndZoom()
virtual void OnMouseWheel(albaEventInteraction *e)
virtual void StartRotate()
virtual void OnMiddleButtonDown(albaEventInteraction *e)
virtual void OnLeftButtonDown(albaEventInteraction *e)
virtual void StartDolly()
Abstract class for ALBA interactors This class provides base interface and features of ALBA continuou...
albaMTime - record modification timestamp.
Definition: albaMTime.h:38