VTK  9.1.0
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);
44 
45  unsigned char* GetBinaryData();
48  bool HasChanged();
49 
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
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
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:259
@ string
Definition: vtkX3D.h:496
WebGLObjectTypes