ODIN
odinplot_vtk.h
1 /***************************************************************************
2  odinplot_vtk.h - description
3  -------------------
4  begin : Tue Jul 26 2005
5  copyright : (C) 2000-2021 by Thies H. Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef ODINPLOT_VTK_H
19 #define ODINPLOT_VTK_H
20 
21 
22 
23 #include <tjutils/tjtools.h>
24 #include <tjutils/tjlog.h>
25 
26 // forward declarations of vtk classes
27 class vtkRenderer;
28 class vtkRenderWindow;
29 class vtkRenderWindowInteractor;
30 class vtkPolyDataMapper;
31 class vtkActor;
32 class vtkAxes;
33 class vtkTubeFilter;
34 class vtkActor;
35 class vtkArrowSource;
36 
37 
39 
40 
41 class VtkMagnPlotter {
42 
43  public:
44  VtkMagnPlotter();
45  ~VtkMagnPlotter();
46 
47  void start();
48 
49  void plot_vector(float M[3], float* dM);
50 
51  void interact();
52 
53  private:
54  vtkRenderer* renderer;
55  vtkRenderWindow* renWin;
56  vtkRenderWindowInteractor* iren;
57  vtkArrowSource* magnArrow;
58  vtkPolyDataMapper* magnMapper;
59  vtkActor* magnActor;
60  vtkActor* magnGradActor;
61  vtkAxes* axes;
62  vtkTubeFilter* axesTubes;
63  vtkPolyDataMapper* axesMapper;
64  vtkActor* axesActor;
65 
66  bool magnGradActor_added;
67 };
68 
69 #endif