VTK  9.2.6
vtkWebGLWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWebGLWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
20 #ifndef vtkWebGLWidget_h
21 #define vtkWebGLWidget_h
22 
23 #include "vtkWebGLExporterModule.h" // needed for export macro
24 #include "vtkWebGLObject.h"
25 
26 #include <vector> // Needed to store colors
27 
28 class vtkActor2D;
29 
30 class VTKWEBGLEXPORTER_EXPORT vtkWebGLWidget : public vtkWebGLObject
31 {
32 public:
33  static vtkWebGLWidget* New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
37  void GenerateBinaryData() override;
38  unsigned char* GetBinaryData(int part) override;
39  int GetBinarySize(int part) override;
40  int GetNumberOfParts() override;
41 
42  void GetDataFromColorMap(vtkActor2D* actor);
43 
44 protected:
46  ~vtkWebGLWidget() override;
47 
48  unsigned char* binaryData;
51  char* title;
52  char* textFormat;
54  float position[2];
55  float size[2];
57  std::vector<double*> colors; // x, r, g, b
58 
59 private:
60  vtkWebGLWidget(const vtkWebGLWidget&) = delete;
61  void operator=(const vtkWebGLWidget&) = delete;
62 };
63 
64 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:45
virtual int GetBinarySize(int part)
vtkWebGLObject represent and manipulate an WebGL object and its data.
virtual unsigned char * GetBinaryData(int part)
unsigned char * binaryData
std::vector< double * > colors
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Widget representation for WebGL.
static vtkWebGLObject * New()
virtual void GenerateBinaryData()
virtual int GetNumberOfParts()