VTK  9.2.6
vtkWebGLDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWebGLDataSet.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 vtkWebGLDataSet_h
21 #define vtkWebGLDataSet_h
22 
23 #include "vtkObject.h"
24 #include "vtkWebGLExporterModule.h" // needed for export macro
25 
26 #include "vtkWebGLObject.h" // Needed for the enum
27 #include <string> // needed for md5
28 
29 class VTKWEBGLEXPORTER_EXPORT vtkWebGLDataSet : public vtkObject
30 {
31 public:
32  static vtkWebGLDataSet* New();
33  vtkTypeMacro(vtkWebGLDataSet, vtkObject);
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
36  void SetVertices(float* v, int size);
37  void SetIndexes(short* i, int size);
38  void SetNormals(float* n);
39  void SetColors(unsigned char* c);
40  void SetPoints(float* p, int size);
41  void SetTCoords(float* t);
42  void SetMatrix(float* m);
43  void SetType(WebGLObjectTypes t);
44 
45  unsigned char* GetBinaryData();
46  int GetBinarySize();
47  void GenerateBinaryData();
48  bool HasChanged();
49 
50  std::string GetMD5();
51 
52 protected:
54  ~vtkWebGLDataSet() override;
55 
60 
61  float* Matrix;
62  float* vertices;
63  float* normals;
64  short* indexes;
65  float* points;
66  float* tcoords;
67  unsigned char* colors;
68  unsigned char* binary; // Data in binary
69  int binarySize; // Size of the data in binary
70  bool hasChanged;
72 
73 private:
74  vtkWebGLDataSet(const vtkWebGLDataSet&) = delete;
75  void operator=(const vtkWebGLDataSet&) = delete;
76 };
77 
78 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
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:39
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...