VTK  9.3.20240418
vtkWebGLWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
8 #ifndef vtkWebGLWidget_h
9 #define vtkWebGLWidget_h
10 
11 #include "vtkWebGLExporterModule.h" // needed for export macro
12 #include "vtkWebGLObject.h"
13 
14 #include <vector> // Needed to store colors
15 
16 VTK_ABI_NAMESPACE_BEGIN
17 class vtkActor2D;
18 
19 class VTKWEBGLEXPORTER_EXPORT vtkWebGLWidget : public vtkWebGLObject
20 {
21 public:
22  static vtkWebGLWidget* New();
24  void PrintSelf(ostream& os, vtkIndent indent) override;
25 
26  void GenerateBinaryData() override;
27  unsigned char* GetBinaryData(int part) override;
28  int GetBinarySize(int part) override;
29  int GetNumberOfParts() override;
30 
32 
33 protected:
35  ~vtkWebGLWidget() override;
36 
37  unsigned char* binaryData;
40  char* title;
41  char* textFormat;
43  float position[2];
44  float size[2];
46  std::vector<double*> colors; // x, r, g, b
47 
48 private:
49  vtkWebGLWidget(const vtkWebGLWidget&) = delete;
50  void operator=(const vtkWebGLWidget&) = delete;
51 };
52 
53 VTK_ABI_NAMESPACE_END
54 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:145
a simple class to control print indentation
Definition: vtkIndent.h:108
vtkWebGLObject represent and manipulate an WebGL object and its data.
Widget representation for WebGL.
int GetBinarySize(int part) override
std::vector< double * > colors
unsigned char * GetBinaryData(int part) override
static vtkWebGLWidget * New()
int GetNumberOfParts() override
void GetDataFromColorMap(vtkActor2D *actor)
~vtkWebGLWidget() override
unsigned char * binaryData
void GenerateBinaryData() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
@ position
Definition: vtkX3D.h:261
@ size
Definition: vtkX3D.h:253