VTK  9.4.20241221
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
16VTK_ABI_NAMESPACE_BEGIN
17class vtkMatrix4x4;
19
21{
23 wLINES = 1,
24 wTRIANGLES = 2
25};
26
27class VTKWEBGLEXPORTER_EXPORT vtkWebGLObject : public vtkObject
28{
29public:
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);
52 void SetIsWidget(bool w);
53 void SetHasTransparency(bool t);
54 void SetInteractAtServer(bool i);
57 bool isVisible();
58 bool HasChanged();
59 bool isWidget();
62
63 std::string GetMD5();
64 std::string GetId();
65
66 size_t GetRendererId();
67 int GetLayer();
68
69protected:
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
77 std::string MD5;
85
86private:
87 vtkWebGLObject(const vtkWebGLObject&) = delete;
88 void operator=(const vtkWebGLObject&) = delete;
89};
90
91VTK_ABI_NAMESPACE_END
92#endif
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
abstract base class for most VTK objects
Definition vtkObject.h:162
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)
static vtkWebGLObject * New()
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()
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.
void SetVisibility(bool vis)
std::string GetMD5()
std::string MD5
~vtkWebGLObject() override
void SetRendererId(size_t i)
virtual unsigned char * GetBinaryData(int part)
bool InteractAtServer()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
WebGLObjectTypes
@ wTRIANGLES
@ wPOINTS
@ wLINES