VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Web/WebGLExporter/vtkWebGLDataSet.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkWebGLDataSet.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00020 #ifndef vtkWebGLDataSet_h
00021 #define vtkWebGLDataSet_h
00022 
00023 #include "vtkObject.h"
00024 #include "vtkWebGLExporterModule.h" // needed for export macro
00025 
00026 #include "vtkWebGLObject.h" // Needed for the enum
00027 #include <string> // needed for md5
00028 
00029 class VTKWEBGLEXPORTER_EXPORT vtkWebGLDataSet : public vtkObject
00030 {
00031 public:
00032   static vtkWebGLDataSet* New();
00033   vtkTypeMacro(vtkWebGLDataSet, vtkObject)
00034   void PrintSelf(ostream &os, vtkIndent indent);
00035 
00036   void SetVertices(float* v, int size);
00037   void SetIndexes(short* i, int size);
00038   void SetNormals(float* n);
00039   void SetColors(unsigned char* c);
00040   void SetPoints(float* p, int size);
00041   void SetTCoords(float *t);
00042   void SetMatrix(float* m);
00043   void SetType(WebGLObjectTypes t);
00044 
00045   unsigned char* GetBinaryData();
00046   int GetBinarySize();
00047   void GenerateBinaryData();
00048   bool HasChanged();
00049 
00050   //BTX
00051   std::string GetMD5();
00052   //ETX
00053 
00054 protected:
00055   vtkWebGLDataSet();
00056   ~vtkWebGLDataSet();
00057 
00058   int NumberOfVertices;
00059   int NumberOfPoints;
00060   int NumberOfIndexes;
00061   WebGLObjectTypes webGLType;
00062 
00063   float* Matrix;
00064   float* vertices;
00065   float* normals;
00066   short* indexes;
00067   float* points;
00068   float* tcoords;
00069   unsigned char* colors;
00070   unsigned char* binary;   // Data in binary
00071   int binarySize;          // Size of the data in binary
00072   bool hasChanged;
00073   std::string MD5;
00074 
00075 private:
00076   vtkWebGLDataSet(const vtkWebGLDataSet&); // Not implemented
00077   void operator=(const vtkWebGLDataSet&);   // Not implemented
00078 };
00079 
00080 #endif