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