VTK  9.0.3
vtkWebGLObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWebGLObject.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 vtkWebGLObject_h
22 #define vtkWebGLObject_h
23 
24 #include "vtkObject.h"
25 #include "vtkWebGLExporterModule.h" // needed for export macro
26 
27 #include <string> // needed for ID and md5 storing
28 
29 class vtkMatrix4x4;
31 
33 {
34  wPOINTS = 0,
35  wLINES = 1,
36  wTRIANGLES = 2
37 };
38 
39 class VTKWEBGLEXPORTER_EXPORT vtkWebGLObject : public vtkObject
40 {
41 public:
42  static vtkWebGLObject* New();
43  vtkTypeMacro(vtkWebGLObject, vtkObject);
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  virtual void GenerateBinaryData();
47  virtual unsigned char* GetBinaryData(int part);
48  virtual int GetBinarySize(int part);
49  virtual int GetNumberOfParts();
50 
56  void GetBinaryData(int part, vtkUnsignedCharArray* buffer);
57 
58  void SetLayer(int l);
59  void SetRendererId(size_t i);
60  void SetId(const std::string& i);
61  void SetWireframeMode(bool wireframe);
62  void SetVisibility(bool vis);
64  void SetIsWidget(bool w);
65  void SetHasTransparency(bool t);
66  void SetInteractAtServer(bool i);
69  bool isVisible();
70  bool HasChanged();
71  bool isWidget();
74 
77 
78  size_t GetRendererId();
79  int GetLayer();
80 
81 protected:
83  ~vtkWebGLObject() override;
84 
85  float Matrix[16];
86  size_t rendererId;
87  int layer; // Renderer Layer
88  std::string id; // Id of the object
90  bool hasChanged;
92  bool isvisible;
95  bool iswidget;
97 
98 private:
99  vtkWebGLObject(const vtkWebGLObject&) = delete;
100  void operator=(const vtkWebGLObject&) = delete;
101 };
102 
103 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:36
abstract base class for most VTK objects
Definition: vtkObject.h:63
dynamic, self-adjusting array of unsigned char
vtkWebGLObject represent and manipulate an WebGL object and its data.
void SetHasTransparency(bool t)
std::string id
void SetTransformationMatrix(vtkMatrix4x4 *m)
void SetId(const std::string &i)
void SetLayer(int l)
size_t GetRendererId()
virtual int GetBinarySize(int part)
std::string GetId()
WebGLObjectTypes webGlType
void SetIsWidget(bool w)
virtual int GetNumberOfParts()
virtual void GenerateBinaryData()
bool isWireframeMode()
bool HasTransparency()
virtual unsigned char * GetBinaryData(int part)
void SetWireframeMode(bool wireframe)
void SetType(WebGLObjectTypes t)
void SetInteractAtServer(bool i)
void GetBinaryData(int part, vtkUnsignedCharArray *buffer)
This is a wrapper friendly method for access the binary data.
static vtkWebGLObject * New()
void SetVisibility(bool vis)
std::string GetMD5()
std::string MD5
~vtkWebGLObject() override
void SetRendererId(size_t i)
bool InteractAtServer()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
@ string
Definition: vtkX3D.h:496
WebGLObjectTypes
@ wTRIANGLES
@ wPOINTS
@ wLINES