VTKFIG  0.25.0
Easy VTK based in situ visualization
vtkfigGridView.h
Go to the documentation of this file.
1 
8 #ifndef VTKFIG_GRID_VIEW_H
9 #define VTKFIG_GRID_VIEW_H
10 
11 #include <vtkCommand.h>
12 #include <vtkDataSetAttributes.h>
13 #include <vtkGeometryFilter.h>
14 #include <vtkRectilinearGridGeometryFilter.h>
15 #include <vtkExtractGeometry.h>
16 
17 #include "vtkfigDataSet.h"
18 #include "vtkfigTools.h"
19 #include "vtkfigFigure.h"
20 
21 
22 
23 namespace vtkfig
24 {
25 
33  class GridView: public Figure
34  {
35 
36 
37 
38  public:
40  static std::shared_ptr<GridView> New();
41 
42 
43  std::string SubClassName() override final {return std::string("GridView");}
44 
46  void ShowGridColorbar(bool b) { Figure::state.show_grid_colorbar=b;}
47 
49  void ShowGridEdges(bool b) { Figure::state.show_grid_edges=b;}
50 
51  protected:
52  GridView();
53  ~GridView(){};
54 
55  private:
56 
57 
58  friend class Client;
59  friend class vtkfigRenderThread;
60 
62  void RTProcessKey(const std::string key) override final;
63  void RTProcessMove(int dx, int dy) override final;
64 
65  void RTShowPlanePos(vtkSmartPointer<vtkPlane> planeXYZ, const std::string plane, int idim);
66 
67  int RTProcessPlaneKey(
68  const std::string plane,
69  int idim,
70  const std::string key,
71  bool & edit,
72  vtkSmartPointer<vtkPlane> planeXYZ);
73 
74  int RTProcessPlaneMove(const std::string plane,int idim, int dx, int dy, bool & edit,
75  vtkSmartPointer<vtkPlane> planeXYZ );
76 
77 
78 
79 
80  void RTBuildVTKPipeline() override final;
81  vtkSmartPointer<vtkExtractGeometry> cutgeometry;
82  vtkSmartPointer<vtkExtractGeometry> bcutgeometry=NULL;
83 
84 
85 
86  vtkSmartPointer<vtkActor> cellplot=NULL;
87  vtkSmartPointer<vtkActor> edgeplot=NULL;
88 
89  vtkSmartPointer<vtkActor> bcellplot=NULL;
90  vtkSmartPointer<vtkActor> bedgeplot=NULL;
91 
92  template <class GRIDFUNC, class FILTER>
93  void RTBuildVTKPipeline2D();
94 
95  template <class GRIDFUNC, class FILTER>
96  void RTBuildVTKPipeline3D();
97 
98  };
99 
100 }
101 
102 
103 
104 #endif
105 
vtkfig::Figure::edit
struct vtkfig::Figure::@1 edit
edit state
vtkfig::Figure::state
struct vtkfig::Figure::@0 state
figure state
vtkfig::GridView::New
static std::shared_ptr< GridView > New()
GridView smart pointer constructor.
vtkfig::GridView::ShowGridEdges
void ShowGridEdges(bool b)
Toggle visibility of grid edges.
Definition: vtkfigGridView.h:49
vtkfigFigure.h
vtkfig::GridView::SubClassName
std::string SubClassName() override final
Get subclass name (for s-c communication, should be replaced by tag.
Definition: vtkfigGridView.h:43
vtkfig::GridView
Grid visualization.
Definition: vtkfigGridView.h:33
vtkfig::Figure
Base class for all figures.
Definition: vtkfigFigure.h:61
vtkfig::GridView::ShowGridColorbar
void ShowGridColorbar(bool b)
Toggle visibility of grid colorbar.
Definition: vtkfigGridView.h:46
vtkfigTools.h
vtkfigDataSet.h