VTK
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 =========================================================================*/
21 #ifndef vtkWebGLWidget_h
22 #define vtkWebGLWidget_h
23 
24 #include "vtkWebGLObject.h"
25 #include "vtkWebGLExporterModule.h" // needed for export macro
26 
27 #include <vector> // Needed to store colors
28 
29 class vtkActor2D;
30 
31 class VTKWEBGLEXPORTER_EXPORT vtkWebGLWidget : public vtkWebGLObject
32 {
33 public:
34  static vtkWebGLWidget* New();
36  void PrintSelf(ostream &os, vtkIndent indent) override;
37 
38  void GenerateBinaryData() override;
39  unsigned char* GetBinaryData(int part) override;
40  int GetBinarySize(int part) override;
41  int GetNumberOfParts() override;
42 
43  void GetDataFromColorMap(vtkActor2D* actor);
44 
45 protected:
47  ~vtkWebGLWidget() override;
48 
49  unsigned char* binaryData;
52  char* title;
53  char* textFormat;
55  float position[2];
56  float size[2];
58  std::vector <double*>colors; //x, r, g, b
59 
60 private:
61  vtkWebGLWidget(const vtkWebGLWidget&) = delete;
62  void operator=(const vtkWebGLWidget&) = delete;
63 
64 };
65 
66 #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()