VTK  9.3.1
vtkWebGLObject.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 vtkWebGLObject_h
9 #define vtkWebGLObject_h
10 
11 #include "vtkObject.h"
12 #include "vtkWebGLExporterModule.h" // needed for export macro
13 
14 #include <string> // needed for ID and md5 storing
15 
16 VTK_ABI_NAMESPACE_BEGIN
17 class vtkMatrix4x4;
19 
21 {
22  wPOINTS = 0,
23  wLINES = 1,
25 };
26 
27 class VTKWEBGLEXPORTER_EXPORT vtkWebGLObject : public vtkObject
28 {
29 public:
30  static vtkWebGLObject* New();
31  vtkTypeMacro(vtkWebGLObject, vtkObject);
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  virtual void GenerateBinaryData();
35  virtual unsigned char* GetBinaryData(int part);
36  virtual int GetBinarySize(int part);
37  virtual int GetNumberOfParts();
38 
44  void GetBinaryData(int part, vtkUnsignedCharArray* buffer);
45 
46  void SetLayer(int l);
47  void SetRendererId(size_t i);
48  void SetId(const std::string& i);
49  void SetWireframeMode(bool wireframe);
50  void SetVisibility(bool vis);
51  void SetTransformationMatrix(vtkMatrix4x4* m);
52  void SetIsWidget(bool w);
53  void SetHasTransparency(bool t);
54  void SetInteractAtServer(bool i);
55  void SetType(WebGLObjectTypes t);
56  bool isWireframeMode();
57  bool isVisible();
58  bool HasChanged();
59  bool isWidget();
60  bool HasTransparency();
61  bool InteractAtServer();
62 
63  std::string GetMD5();
64  std::string GetId();
65 
66  size_t GetRendererId();
67  int GetLayer();
68 
69 protected:
71  ~vtkWebGLObject() override;
72 
73  float Matrix[16];
74  size_t rendererId;
75  int layer; // Renderer Layer
76  std::string id; // Id of the object
78  bool hasChanged;
80  bool isvisible;
83  bool iswidget;
85 
86 private:
87  vtkWebGLObject(const vtkWebGLObject&) = delete;
88  void operator=(const vtkWebGLObject&) = delete;
89 };
90 
91 VTK_ABI_NAMESPACE_END
92 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:30
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWebGLObject represent and manipulate an WebGL object and its data.
a simple class to control print indentation
Definition: vtkIndent.h:28
dynamic, self-adjusting array of unsigned char
WebGLObjectTypes
std::string id
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
std::string MD5
WebGLObjectTypes webGlType