VTKFIG  0.20.20181114
Easy VTK based in situ visualization
void vtkfig::GridView::RTProcessKey ( const std::string  key)
finaloverridevirtual

Process keyboard and mouse move events.

Reimplemented from vtkfig::Figure.

Definition at line 115 of file vtkfigGridView.cxx.

116  {
117 
118  if (key=="slash")
119  {
120  cutgeometry->SetExtractInside(!cutgeometry->GetExtractInside());
121  cutgeometry->Modified();
122  bcutgeometry->SetExtractInside(!bcutgeometry->GetExtractInside());
123  bcutgeometry->Modified();
124  return;
125  }
126 
127  if (key=="A")
128  {
129  if (axes)
130  {
131  int vis=axes->GetVisibility();
132  vis=!vis;
133  axes->SetVisibility(vis);
134  if (outline)
135  outline->SetVisibility(vis);
136  }
137  return;
138  }
139 
140  if (key=="O")
141  {
142  if (splot)
143  {
144  int vis=splot->GetVisibility();
145  vis=!vis;
146  splot->SetVisibility(vis);
147  }
148  return;
149  }
150 
151 
152 
153  if (key=="C" && cellplot)
154  {
155  int vis=cellplot->GetVisibility();
156  vis=!vis;
157  cellplot->SetVisibility(vis);
158  if (edgeplot)
159  edgeplot->SetVisibility(vis);
160 
161  if (cbar)
162  cbar->SetVisibility(vis);
163  return;
164  }
165 
166  if (key=="B" && bcellplot)
167  {
168  int vis=bcellplot->GetVisibility();
169  vis=!vis;
170  bcellplot->SetVisibility(vis);
171  if (bedgeplot)
172  bedgeplot->SetVisibility(vis);
173  if (bcbar)
174  bcbar->SetVisibility(vis);
175  return;
176  }
177 
178 
179  if (
180  (edit.x_plane||edit.y_plane|| edit.z_plane)
181  &&(key=="x"|| key=="y"|| key=="z")
182  )
183  {
184  edit.x_plane=false;
185  edit.y_plane=false;
186  edit.z_plane=false;
187  }
188 
189  if (RTProcessPlaneKey("x",0,key,edit.x_plane, planeX)) return;
190  if (RTProcessPlaneKey("y",1,key,edit.y_plane, planeY)) return;
191  if (RTProcessPlaneKey("z",2,key,edit.z_plane, planeZ)) return;
192 
193 
194  }
vtkSmartPointer< vtkActor > outline
Definition: vtkfigFigure.h:237
vtkSmartPointer< vtkScalarBarActor > bcbar
Definition: vtkfigFigure.h:294
vtkSmartPointer< vtkActor > bcellplot
int RTProcessPlaneKey(const std::string plane, int idim, const std::string key, bool &edit, vtkSmartPointer< vtkPlane > planeXYZ)
vtkSmartPointer< vtkActor > splot
Definition: vtkfigFigure.h:238
vtkSmartPointer< vtkCubeAxesActor2D > axes
Definition: vtkfigFigure.h:236
vtkSmartPointer< vtkExtractGeometry > cutgeometry
struct vtkfig::Figure::@1 edit
edit state
vtkSmartPointer< vtkActor > bedgeplot
vtkSmartPointer< vtkActor > cellplot
vtkSmartPointer< vtkActor > edgeplot
vtkSmartPointer< vtkExtractGeometry > bcutgeometry
vtkSmartPointer< vtkPlane > planeY
Definition: vtkfigFigure.h:209
vtkSmartPointer< vtkPlane > planeX
Plane equations for plane sections.
Definition: vtkfigFigure.h:208
vtkSmartPointer< vtkScalarBarActor > cbar
Definition: vtkfigFigure.h:293
vtkSmartPointer< vtkPlane > planeZ
Definition: vtkfigFigure.h:210

+ Here is the call graph for this function: