VTK: Web/WebGLExporter/vtkWebGLWidget.h Source File

| VTK 9.3.1

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();
23 vtkTypeMacro(vtkWebGLWidget, vtkWebGLObject);
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
31 void GetDataFromColorMap(vtkActor2D* actor);
32
33 protected:
34 vtkWebGLWidget();
35 ~vtkWebGLWidget() override;
36
37 unsigned char* binaryData;
38 int binarySize;
39 int orientation;
40 char* title;
41 char* textFormat;
42 int textPosition;
43 float position[2];
44 float size[2];
45 int numberOfLabels;
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
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:44
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkWebGLObject
vtkWebGLObject represent and manipulate an WebGL object and its data.
Definition: vtkWebGLObject.h:28
vtkWebGLWidget
Widget representation for WebGL.
Definition: vtkWebGLWidget.h:20
vtkWebGLWidget::GetBinarySize
int GetBinarySize(int part) override
vtkWebGLWidget::vtkWebGLWidget
vtkWebGLWidget()
vtkWebGLWidget::colors
std::vector< double * > colors
Definition: vtkWebGLWidget.h:46
vtkWebGLWidget::orientation
int orientation
Definition: vtkWebGLWidget.h:39
vtkWebGLWidget::numberOfLabels
int numberOfLabels
Definition: vtkWebGLWidget.h:45
vtkWebGLWidget::textFormat
char * textFormat
Definition: vtkWebGLWidget.h:41
vtkWebGLWidget::GetBinaryData
unsigned char * GetBinaryData(int part) override
vtkWebGLWidget::New
static vtkWebGLWidget * New()
vtkWebGLWidget::GetNumberOfParts
int GetNumberOfParts() override
vtkWebGLWidget::GetDataFromColorMap
void GetDataFromColorMap(vtkActor2D *actor)
vtkWebGLWidget::~vtkWebGLWidget
~vtkWebGLWidget() override
vtkWebGLWidget::binaryData
unsigned char * binaryData
Definition: vtkWebGLWidget.h:37
vtkWebGLWidget::GenerateBinaryData
void GenerateBinaryData() override
vtkWebGLWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWebGLWidget::textPosition
int textPosition
Definition: vtkWebGLWidget.h:42
vtkWebGLWidget::binarySize
int binarySize
Definition: vtkWebGLWidget.h:38
vtkWebGLWidget::title
char * title
Definition: vtkWebGLWidget.h:40
vtkX3D::position
@ position
Definition: vtkX3D.h:261
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkWebGLObject.h