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
vtkWebGLDataSet::MD5
std::string MD5
Definition: vtkWebGLDataSet.h:71
vtkWebGLDataSet::SetPoints
void SetPoints(float *p, int size)
vtkWebGLDataSet::NumberOfPoints
int NumberOfPoints
Definition: vtkWebGLDataSet.h:57
vtkWebGLDataSet::SetNormals
void SetNormals(float *n)
vtkWebGLDataSet::GetMD5
std::string GetMD5()
vtkWebGLDataSet::SetColors
void SetColors(unsigned char *c)
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkWebGLDataSet::binarySize
int binarySize
Definition: vtkWebGLDataSet.h:69
vtkWebGLDataSet::SetTCoords
void SetTCoords(float *t)
vtkWebGLObject.h
vtkWebGLDataSet::SetVertices
void SetVertices(float *v, int size)
vtkWebGLDataSet::GetBinaryData
unsigned char * GetBinaryData()
vtkWebGLDataSet::Matrix
float * Matrix
Definition: vtkWebGLDataSet.h:61
vtkWebGLDataSet::normals
float * normals
Definition: vtkWebGLDataSet.h:63
vtkWebGLDataSet::binary
unsigned char * binary
Definition: vtkWebGLDataSet.h:68
vtkWebGLDataSet::NumberOfIndexes
int NumberOfIndexes
Definition: vtkWebGLDataSet.h:58
vtkWebGLDataSet::webGLType
WebGLObjectTypes webGLType
Definition: vtkWebGLDataSet.h:59
vtkWebGLDataSet::GenerateBinaryData
void GenerateBinaryData()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkWebGLDataSet::New
static vtkWebGLDataSet * New()
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkWebGLDataSet::GetBinarySize
int GetBinarySize()
vtkWebGLDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWebGLDataSet::SetType
void SetType(WebGLObjectTypes t)
vtkWebGLDataSet::points
float * points
Definition: vtkWebGLDataSet.h:65
vtkObject.h
vtkWebGLDataSet::vtkWebGLDataSet
vtkWebGLDataSet()
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkWebGLDataSet::hasChanged
bool hasChanged
Definition: vtkWebGLDataSet.h:70
vtkWebGLDataSet::NumberOfVertices
int NumberOfVertices
Definition: vtkWebGLDataSet.h:56
vtkWebGLDataSet::indexes
short * indexes
Definition: vtkWebGLDataSet.h:64
vtkWebGLDataSet::tcoords
float * tcoords
Definition: vtkWebGLDataSet.h:66
WebGLObjectTypes
WebGLObjectTypes
Definition: vtkWebGLObject.h:32
vtkWebGLDataSet::colors
unsigned char * colors
Definition: vtkWebGLDataSet.h:67
vtkWebGLDataSet
vtkWebGLDataSet represent vertices, lines, polygons, and triangles.
Definition: vtkWebGLDataSet.h:30
vtkWebGLDataSet::vertices
float * vertices
Definition: vtkWebGLDataSet.h:62
vtkWebGLDataSet::HasChanged
bool HasChanged()
vtkWebGLDataSet::SetMatrix
void SetMatrix(float *m)
vtkWebGLDataSet::~vtkWebGLDataSet
~vtkWebGLDataSet() override
vtkWebGLDataSet::SetIndexes
void SetIndexes(short *i, int size)