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 SetRotation(
double v);
89 double GetRotation()
const;
90 void SetLastRotation(
double v);
91 double GetLastRotation()
const;
92 void SetScale(
double scale);
93 double GetScale()
const;
94 void SetLastScale(
double scale);
95 double GetLastScale()
const;
96 void SetTranslation(
const double translation[2]);
97 const double *GetTranslation()
const;
98 void SetLastTranslation(
const double translation[2]);
99 const double* GetLastTranslation()
const;
100 void SetWorldToPhysicalScale(
double v);
101 double GetWorldToPhysicalScale()
const;
104 void SetAttributesFromInteractor(vtkRenderWindowInteractor* interactor);
106 vtkRenderer* GetRenderer()
const;
107 void SetRenderer(vtkRenderer* ren);
109 void SetAccuratePicker(vtkCellPicker* picker);
110 vtkCellPicker* GetAccuratePicker()
const;
112 void SetInteractionContextName(
const std::string& v);
113 const std::string& GetInteractionContextName();
117 int DisplayPosition[2];
142 double Translation[2];
143 double LastTranslation[2];
153 bool Equivalent(
const vtkEventData *e)
const override;
bool WorldPositionAccurate
bool ComputeAccurateWorldPositionAttempted
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 DisplayPositionValid