VTK
vtkGenericCellTessellator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGenericCellTessellator.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=========================================================================*/
40#ifndef vtkGenericCellTessellator_h
41#define vtkGenericCellTessellator_h
42
43#include "vtkCommonDataModelModule.h" // For export macro
44#include "vtkObject.h"
45
46class vtkCellArray;
47class vtkDoubleArray;
48class vtkCollection;
52class vtkPointData;
54
55//-----------------------------------------------------------------------------
56//
57// The tessellation object
58class VTKCOMMONDATAMODEL_EXPORT vtkGenericCellTessellator : public vtkObject
59{
60public:
62 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
63
81 vtkCellArray *cellArray,
82 vtkPointData *internalPd)=0;
83
97 vtkCellArray *cellArray,
98 vtkPointData *internalPd )=0;
99
113 vtkCellArray *cellArray,
114 vtkPointData *internalPd)=0;
115
117
121 virtual void SetErrorMetrics(vtkCollection *someErrorMetrics);
122 vtkGetObjectMacro(ErrorMetrics,vtkCollection);
124
128 virtual void Initialize(vtkGenericDataSet *ds)=0;
129
135
137
140 vtkGetMacro(Measurement,int);
141 vtkSetMacro(Measurement,int);
143
149 void GetMaxErrors(double *errors);
150
151protected:
154
172 int RequiresEdgeSubdivision(double *left, double *mid, double *right,
173 double alpha);
174
175
189 virtual void UpdateMaxError(double *leftPoint, double *midPoint,
190 double *rightPoint, double alpha);
191
196 void ResetMaxErrors();
197
201 vtkCollection *ErrorMetrics;
202
209 void SetGenericCell(vtkGenericAdaptorCell *cell);
210
212
213 int Measurement; // if true, measure the quality of the fixed subdivision.
214 double *MaxErrors; // max error for each error metric, for measuring the
215 // quality of a fixed subdivision.
216 int MaxErrorsCapacity;
217
218private:
219 vtkGenericCellTessellator(const vtkGenericCellTessellator&) VTK_DELETE_FUNCTION;
220 void operator=(const vtkGenericCellTessellator&) VTK_DELETE_FUNCTION;
221};
222
223#endif
object to represent cell connectivity
Definition: vtkCellArray.h:51
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
dynamic, self-adjusting array of double
defines cell interface
iterator used to traverse cells
helper class to perform cell tessellation
virtual void Initialize(vtkGenericDataSet *ds)=0
Initialize the tessellator with a data set ‘ds’.
~vtkGenericCellTessellator() override
virtual void SetErrorMetrics(vtkCollection *someErrorMetrics)
Specify the list of error metrics used to decide if an edge has to be splitted or not.
virtual void TessellateFace(vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkIdType index, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd)=0
Tessellate a face of a 3D ‘cell’.
virtual void Tessellate(vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd)=0
Tessellate a 3D ‘cell’.
virtual void Triangulate(vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd)=0
Triangulate a 2D ‘cell’.
void InitErrorMetrics(vtkGenericDataSet *ds)
Init the error metric with the dataset.
void GetMaxErrors(double *errors)
Get the maximum error measured after the fixed subdivision.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
defines dataset interface
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
represent and manipulate point attribute data
Definition: vtkPointData.h:38
@ points
Definition: vtkX3D.h:446
@ alpha
Definition: vtkX3D.h:250
@ index
Definition: vtkX3D.h:246
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287