rock_widget_collection  0.1
vectorfield3D.h
Go to the documentation of this file.
1 
10 #ifndef VECTORFIELD3D_H
11 #define VECTORFIELD3D_H
12 
13 #include <QtGui>
14 #include <QtCore>
15 #include <QString>
16 #include <QVTKWidget.h>
17 #include <QtDesigner/QDesignerExportWidget>
18 #include <vtkPolyData.h>
19 #include <vtkPoints.h>
20 #include <vtkFloatArray.h>
21 #include <vtkPolyDataMapper.h>
22 #include <vtkLookupTable.h>
23 #include <vtkRenderer.h>
24 #include <vtkScalarBarActor.h>
25 #include <vtkSmartPointer.h>
26 #include <vtkOrientationMarkerWidget.h>
27 #include <base/Pose.hpp>
28 #include <base/Eigen.hpp>
29 
31 
32 class QDESIGNER_WIDGET_EXPORT Vectorfield3D : public QVTKWidget
33 {
34  Q_OBJECT
35  Q_CLASSINFO("Author", "Leif Christensen")
36 
37 public:
38  Vectorfield3D(QWidget *parent = 0);
39  virtual ~Vectorfield3D();
40 
41 public slots:
42 
45  void setScalarBarTitle(QString title);
46 
49  void setTitle(QString title);
50 
54  void addVector(base::Position pos, base::Vector3d flux);
55 
59  void addVector(double px, double py, double pz,
60  double x, double y, double z);
61 
63  void showScalarBar(bool b);
64 
66  void showOrientationMarker(bool b);
67 
68 private:
69  vtkSmartPointer<vtkPolyData> vectorfield;
70  vtkSmartPointer<vtkPoints> points;
71  vtkSmartPointer<vtkFloatArray> vectors;
72  vtkSmartPointer<vtkPolyDataMapper> glyphMapper;
73  vtkSmartPointer<vtkLookupTable> lut;
74  vtkSmartPointer<vtkRenderer> ren;
75  vtkSmartPointer<vtkScalarBarActor> scalarBar;
76  vtkSmartPointer<vtkOrientationMarkerWidget> marker;
77  double mag_max, mag_min;
78 };
79 
80 #endif /* VECTORFIELD3D_H */
Widget to display vector (flux density) fields in Vizkit based on VTK.
Definition: vectorfield3D.h:32