VTK  9.1.0
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=========================================================================*/
20#ifndef vtkWebGLObject_h
21#define vtkWebGLObject_h
22
23#include "vtkObject.h"
24#include "vtkWebGLExporterModule.h" // needed for export macro
25
26#include <string> // needed for ID and md5 storing
27
28class vtkMatrix4x4;
30
32{
34 wLINES = 1,
35 wTRIANGLES = 2
36};
37
38class VTKWEBGLEXPORTER_EXPORT vtkWebGLObject : public vtkObject
39{
40public:
42 vtkTypeMacro(vtkWebGLObject, vtkObject);
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
45 virtual void GenerateBinaryData();
46 virtual unsigned char* GetBinaryData(int part);
47 virtual int GetBinarySize(int part);
48 virtual int GetNumberOfParts();
49
55 void GetBinaryData(int part, vtkUnsignedCharArray* buffer);
56
57 void SetLayer(int l);
58 void SetRendererId(size_t i);
59 void SetId(const std::string& i);
60 void SetWireframeMode(bool wireframe);
61 void SetVisibility(bool vis);
63 void SetIsWidget(bool w);
64 void SetHasTransparency(bool t);
65 void SetInteractAtServer(bool i);
68 bool isVisible();
69 bool HasChanged();
70 bool isWidget();
73
74 std::string GetMD5();
75 std::string GetId();
76
77 size_t GetRendererId();
78 int GetLayer();
79
80protected:
82 ~vtkWebGLObject() override;
83
84 float Matrix[16];
85 size_t rendererId;
86 int layer; // Renderer Layer
87 std::string id; // Id of the object
88 std::string MD5;
96
97private:
98 vtkWebGLObject(const vtkWebGLObject&) = delete;
99 void operator=(const vtkWebGLObject&) = delete;
100};
101
102#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
abstract base class for most VTK objects
Definition: vtkObject.h:82
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