VTK  9.3.20240417
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);
33 
34  unsigned char* GetBinaryData();
37  bool HasChanged();
38 
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
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
vtkWebGLDataSet represent vertices, lines, polygons, and triangles.
unsigned char * colors
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTCoords(float *t)
void SetVertices(float *v, int size)
void SetIndexes(short *i, int size)
void SetMatrix(float *m)
~vtkWebGLDataSet() override
std::string GetMD5()
WebGLObjectTypes webGLType
std::string MD5
static vtkWebGLDataSet * New()
void SetNormals(float *n)
void SetColors(unsigned char *c)
void SetType(WebGLObjectTypes t)
void SetPoints(float *p, int size)
unsigned char * binary
unsigned char * GetBinaryData()
void GenerateBinaryData()
@ size
Definition: vtkX3D.h:253
@ string
Definition: vtkX3D.h:490
WebGLObjectTypes