VTKFIG  0.25.0
Easy VTK based in situ visualization
vtkfigGLScene.h
Go to the documentation of this file.
1 
8 #ifndef VTKFIG_GLSCENE_H
9 #define VTKFIG_GLSCENE_H
10 
11 #include <vtkPointData.h>
12 #include <vtkLine.h>
13 
14 #include "vtkfigFigure.h"
15 
16 
17 namespace vtkfig
18 {
22  class GLScene: public Figure
23  {
24  public:
25  static std::shared_ptr<GLScene> New();
26  void Color(double r, double g, double b);
27  void BeginLines(void);
28  void Vertex2(double x, double y);
29  void End(void);
30  void Clear(void);
31 
32 
33  GLScene();
34  ~GLScene(){};
35 
36  private:
37  void RTBuildVTKPipeline() override final;
38  struct
39  {
40  vtkSmartPointer<vtkPolyData> polydata;
41  vtkSmartPointer<vtkPolyDataMapper> mapper;
42  vtkSmartPointer<vtkActor> actor;
43  vtkSmartPointer<vtkPoints> points;
44  vtkSmartPointer<vtkCellArray> lines;
45  vtkSmartPointer<vtkUnsignedCharArray> colors;
46  } line_data;
47  unsigned char current_rgb[3];
48  vtkIdType last_id;
49  };
50 
51 }
52 
53 #endif
vtkfig::GLScene
Drawing with OpenGL 1.1 like API.
Definition: vtkfigGLScene.h:22
vtkfigFigure.h
vtkfig::Figure
Base class for all figures.
Definition: vtkfigFigure.h:61