VTK
vtkWebGLPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWebGLPolyData.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 =========================================================================*/
21 #ifndef vtkWebGLPolyData_h
22 #define vtkWebGLPolyData_h
23 
24 #include "vtkWebGLObject.h"
25 #include "vtkWebGLExporterModule.h" // needed for export macro
26 
27 class vtkActor;
28 class vtkMatrix4x4;
29 class vtkMapper;
30 class vtkPointData;
31 class vtkPolyData;
32 class vtkTriangleFilter;
33 
34 class VTKWEBGLEXPORTER_EXPORT vtkWebGLPolyData : public vtkWebGLObject
35 {
36 public:
37  static vtkWebGLPolyData* New();
39  void PrintSelf(ostream &os, vtkIndent indent);
40 
41  void GenerateBinaryData();
42  unsigned char* GetBinaryData(int part);
43  int GetBinarySize(int part);
44  int GetNumberOfParts();
45 
46  void GetPoints(vtkTriangleFilter* polydata, vtkActor* actor, int maxSize);
47 
48  void GetLinesFromPolygon(vtkMapper* mapper, vtkActor* actor, int lineMaxSize, double* edgeColor);
49  void GetLines(vtkTriangleFilter* polydata, vtkActor* actor, int lineMaxSize);
50  void GetColorsFromPolyData(unsigned char* color, vtkPolyData* polydata, vtkActor* actor);
51 
52  // Get following data from the actor
53  void GetPolygonsFromPointData(vtkTriangleFilter* polydata, vtkActor* actor, int maxSize);
54  void GetPolygonsFromCellData(vtkTriangleFilter* polydata, vtkActor* actor, int maxSize);
55  void GetColorsFromPointData(unsigned char* color, vtkPointData* pointdata, vtkPolyData* polydata, vtkActor* actor);
56 
57  void SetMesh(float* _vertices, int _numberOfVertices, int* _index, int _numberOfIndexes, float* _normals, unsigned char* _colors, float* _tcoords, int maxSize);
58  void SetLine(float* _points, int _numberOfPoints, int* _index, int _numberOfIndex, unsigned char* _colors, int maxSize);
59  void SetPoints(float* points, int numberOfPoints, unsigned char* colors, int maxSize);
61 
62 protected:
65 
66 private:
67  vtkWebGLPolyData(const vtkWebGLPolyData&) VTK_DELETE_FUNCTION;
68  void operator=(const vtkWebGLPolyData&) VTK_DELETE_FUNCTION;
69 
70  class vtkInternal;
71  vtkInternal* Internal;
72 };
73 
74 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
represent and manipulate point attribute data
Definition: vtkPointData.h:37
PolyData representation for WebGL.
void SetTransformationMatrix(vtkMatrix4x4 *m)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
convert input polygons and strips to triangles
virtual int GetBinarySize(int part)
vtkWebGLObject represent and manipulate an WebGL object and its data.
virtual unsigned char * GetBinaryData(int part)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:91
static vtkWebGLObject * New()
virtual void GenerateBinaryData()
virtual int GetNumberOfParts()