VTK  9.1.0
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 "vtkWebGLExporterModule.h" // needed for export macro
24#include "vtkWebGLObject.h"
25
26class vtkActor;
27class vtkMatrix4x4;
28class vtkMapper;
29class vtkPointData;
30class vtkPolyData;
32
33class VTKWEBGLEXPORTER_EXPORT vtkWebGLPolyData : public vtkWebGLObject
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
40 void GenerateBinaryData() override;
41 unsigned char* GetBinaryData(int part) override;
42 int GetBinarySize(int part) override;
43 int GetNumberOfParts() override;
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);
55 unsigned char* color, vtkPointData* pointdata, vtkPolyData* polydata, vtkActor* actor);
56
57 void SetMesh(float* _vertices, int _numberOfVertices, int* _index, int _numberOfIndexes,
58 float* _normals, unsigned char* _colors, float* _tcoords, int maxSize);
59 void SetLine(float* _points, int _numberOfPoints, int* _index, int _numberOfIndex,
60 unsigned char* _colors, int maxSize);
61 void SetPoints(float* points, int numberOfPoints, unsigned char* colors, int maxSize);
63
64protected:
67
68private:
69 vtkWebGLPolyData(const vtkWebGLPolyData&) = delete;
70 void operator=(const vtkWebGLPolyData&) = delete;
71
72 class vtkInternal;
73 vtkInternal* Internal;
74};
75
76#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:171
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
represent and manipulate point attribute data
Definition: vtkPointData.h:142
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
convert input polygons and strips to triangles
vtkWebGLObject represent and manipulate an WebGL object and its data.
PolyData representation for WebGL.
void SetMesh(float *_vertices, int _numberOfVertices, int *_index, int _numberOfIndexes, float *_normals, unsigned char *_colors, float *_tcoords, int maxSize)
void GetColorsFromPolyData(unsigned char *color, vtkPolyData *polydata, vtkActor *actor)
void GenerateBinaryData() override
void GetLines(vtkTriangleFilter *polydata, vtkActor *actor, int lineMaxSize)
int GetBinarySize(int part) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetColorsFromPointData(unsigned char *color, vtkPointData *pointdata, vtkPolyData *polydata, vtkActor *actor)
void GetPolygonsFromCellData(vtkTriangleFilter *polydata, vtkActor *actor, int maxSize)
void GetPoints(vtkTriangleFilter *polydata, vtkActor *actor, int maxSize)
void GetLinesFromPolygon(vtkMapper *mapper, vtkActor *actor, int lineMaxSize, double *edgeColor)
void SetLine(float *_points, int _numberOfPoints, int *_index, int _numberOfIndex, unsigned char *_colors, int maxSize)
void SetPoints(float *points, int numberOfPoints, unsigned char *colors, int maxSize)
void GetPolygonsFromPointData(vtkTriangleFilter *polydata, vtkActor *actor, int maxSize)
int GetNumberOfParts() override
void SetTransformationMatrix(vtkMatrix4x4 *m)
unsigned char * GetBinaryData(int part) override
~vtkWebGLPolyData() override
static vtkWebGLPolyData * New()