18 #ifndef __vtkMRMLInteractionEventData_h 19 #define __vtkMRMLInteractionEventData_h 22 #include "vtkEventData.h" 25 #include "vtkMRMLDisplayableManagerExport.h" 28 class vtkRenderWindowInteractor;
44 LeftButtonClickEvent = vtkCommand::UserEvent + 300,
49 void SetType(
unsigned long v);
51 void SetModifiers(
int v);
55 void SetWorldPosition(
const double p[3],
bool accurate =
true);
59 bool IsWorldPositionValid();
60 bool IsWorldPositionAccurate();
61 void SetWorldPositionInvalid();
63 bool ComputeAccurateWorldPosition(
bool force =
false);
66 void GetDisplayPosition(
int v[2])
const;
67 const int *GetDisplayPosition()
const;
68 void SetDisplayPosition(
const int p[2]);
69 bool IsDisplayPositionValid();
70 void SetDisplayPositionInvalid();
72 void SetKeyCode(
char v);
74 void SetKeyRepeatCount(
char v);
75 int GetKeyRepeatCount();
76 void SetKeySym(
const std::string &v);
77 const std::string& GetKeySym();
82 void SetComponentType(
int componentType);
83 int GetComponentType()
const;
85 void SetComponentIndex(
int componentIndex);
86 int GetComponentIndex()
const;
88 void SetMouseMovedSinceButtonDown(
bool moved);
89 bool GetMouseMovedSinceButtonDown()
const;
91 void SetRotation(
double v);
92 double GetRotation()
const;
93 void SetLastRotation(
double v);
94 double GetLastRotation()
const;
95 void SetScale(
double scale);
96 double GetScale()
const;
97 void SetLastScale(
double scale);
98 double GetLastScale()
const;
99 void SetTranslation(
const double translation[2]);
100 const double *GetTranslation()
const;
101 void SetLastTranslation(
const double translation[2]);
102 const double* GetLastTranslation()
const;
103 void SetWorldToPhysicalScale(
double v);
104 double GetWorldToPhysicalScale()
const;
107 void SetAttributesFromInteractor(vtkRenderWindowInteractor* interactor);
109 vtkRenderer* GetRenderer()
const;
110 void SetRenderer(vtkRenderer* ren);
112 void SetAccuratePicker(vtkCellPicker* picker);
113 vtkCellPicker* GetAccuratePicker()
const;
115 void SetInteractionContextName(
const std::string& v);
116 const std::string& GetInteractionContextName();
118 void WorldToDisplay(
const double worldPosition[3],
double displayPosition[3]);
122 int DisplayPosition[2];
133 double WorldToViewTransformMatrix[16];
150 double Translation[2];
151 double LastTranslation[2];
161 bool Equivalent(
const vtkEventData *e)
const override;
bool WorldPositionAccurate
bool ComputeAccurateWorldPositionAttempted
bool WorldToViewTransformMatrixValid
MRMLInteractionEvents
Extends vtkCommand events.
vtkCellPicker * AccuratePicker
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
double WorldToPhysicalScale
vtkMRMLAbstractViewNode * ViewNode
std::string InteractionContextName
Name of interaction context. In case of the mouse, it is empty string.
bool MouseMovedSinceButtonDown
bool DisplayPositionValid