VTK  9.1.0
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) override;
63
78 vtkIdType index, vtkDoubleArray* points, vtkCellArray* cellArray, vtkPointData* internalPd) = 0;
79
91 vtkDoubleArray* points, vtkCellArray* cellArray, vtkPointData* internalPd) = 0;
92
104 vtkDoubleArray* points, vtkCellArray* cellArray, vtkPointData* internalPd) = 0;
105
107
111 virtual void SetErrorMetrics(vtkCollection* someErrorMetrics);
112 vtkGetObjectMacro(ErrorMetrics, vtkCollection);
114
118 virtual void Initialize(vtkGenericDataSet* ds) = 0;
119
125
127
130 vtkGetMacro(Measurement, int);
131 vtkSetMacro(Measurement, int);
133
139 void GetMaxErrors(double* errors);
140
141protected:
144
162 int RequiresEdgeSubdivision(double* left, double* mid, double* right, double alpha);
163
177 virtual void UpdateMaxError(
178 double* leftPoint, double* midPoint, double* rightPoint, double alpha);
179
185
190
198
203
204 int Measurement; // if true, measure the quality of the fixed subdivision.
205 double* MaxErrors; // max error for each error metric, for measuring the
206 // quality of a fixed subdivision.
208
209private:
211 void operator=(const vtkGenericCellTessellator&) = delete;
212};
213
214#endif
object to represent cell connectivity
Definition: vtkCellArray.h:290
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
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’.
int RequiresEdgeSubdivision(double *left, double *mid, double *right, double alpha)
Does the edge need to be subdivided according to at least one error metric? The edge is defined by it...
void SetGenericCell(vtkGenericAdaptorCell *cell)
Send the current cell to error metrics.
~vtkGenericCellTessellator() override
virtual void SetErrorMetrics(vtkCollection *someErrorMetrics)
Specify the list of error metrics used to decide if an edge has to be split 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 UpdateMaxError(double *leftPoint, double *midPoint, double *rightPoint, double alpha)
Update the max error of each error metric according to the error at the mid-point.
vtkGenericDataSet * DataSet
Dataset to be tessellated.
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.
vtkCollection * ErrorMetrics
List of error metrics.
void ResetMaxErrors()
Reset the maximal error of each error metric.
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:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
represent and manipulate point attribute data
Definition: vtkPointData.h:142
int vtkIdType
Definition: vtkType.h:332