VTK
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 
30 {
31 public:
32  static vtkWebGLDataSet* New();
33  vtkTypeMacro(vtkWebGLDataSet, vtkObject)
34  void PrintSelf(ostream &os, vtkIndent indent);
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  //BTX
51  std::string GetMD5();
52  //ETX
53 
54 protected:
56  ~vtkWebGLDataSet();
57 
58  int NumberOfVertices;
59  int NumberOfPoints;
60  int NumberOfIndexes;
61  WebGLObjectTypes webGLType;
62 
63  float* Matrix;
64  float* vertices;
65  float* normals;
66  short* indexes;
67  float* points;
68  float* tcoords;
69  unsigned char* colors;
70  unsigned char* binary; // Data in binary
71  int binarySize; // Size of the data in binary
72  bool hasChanged;
73  std::string MD5;
74 
75 private:
76  vtkWebGLDataSet(const vtkWebGLDataSet&); // Not implemented
77  void operator=(const vtkWebGLDataSet&); // Not implemented
78 };
79 
80 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKWEBGLEXPORTER_EXPORT
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
WebGLObjectTypes
static vtkObject * New()