VTK  9.3.1
vtkWebGLDataSet.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 vtkWebGLDataSet_h
9 #define vtkWebGLDataSet_h
10 
11 #include "vtkObject.h"
12 #include "vtkWebGLExporterModule.h" // needed for export macro
13 
14 #include "vtkWebGLObject.h" // Needed for the enum
15 #include <string> // needed for md5
16 
17 VTK_ABI_NAMESPACE_BEGIN
18 class VTKWEBGLEXPORTER_EXPORT vtkWebGLDataSet : public vtkObject
19 {
20 public:
21  static vtkWebGLDataSet* New();
22  vtkTypeMacro(vtkWebGLDataSet, vtkObject);
23  void PrintSelf(ostream& os, vtkIndent indent) override;
24 
25  void SetVertices(float* v, int size);
26  void SetIndexes(short* i, int size);
27  void SetNormals(float* n);
28  void SetColors(unsigned char* c);
29  void SetPoints(float* p, int size);
30  void SetTCoords(float* t);
31  void SetMatrix(float* m);
32  void SetType(WebGLObjectTypes t);
33 
34  unsigned char* GetBinaryData();
35  int GetBinarySize();
36  void GenerateBinaryData();
37  bool HasChanged();
38 
39  std::string GetMD5();
40 
41 protected:
43  ~vtkWebGLDataSet() override;
44 
49 
50  float* Matrix;
51  float* vertices;
52  float* normals;
53  short* indexes;
54  float* points;
55  float* tcoords;
56  unsigned char* colors;
57  unsigned char* binary; // Data in binary
58  int binarySize; // Size of the data in binary
59  bool hasChanged;
61 
62 private:
63  vtkWebGLDataSet(const vtkWebGLDataSet&) = delete;
64  void operator=(const vtkWebGLDataSet&) = delete;
65 };
66 
67 VTK_ABI_NAMESPACE_END
68 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned char * colors
WebGLObjectTypes webGLType
unsigned char * binary
a simple class to control print indentation
Definition: vtkIndent.h:28
WebGLObjectTypes
std::string MD5
vtkWebGLDataSet represent vertices, lines, polygons, and triangles.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...