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 
46 class vtkCellArray;
47 class vtkDoubleArray;
48 class vtkCollection;
52 class vtkPointData;
53 class vtkGenericDataSet;
54 
55 //-----------------------------------------------------------------------------
56 //
57 // The tessellation object
58 class VTKCOMMONDATAMODEL_EXPORT vtkGenericCellTessellator : public vtkObject
59 {
60 public:
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
77  virtual void TessellateFace(vtkGenericAdaptorCell *cell,
81  vtkCellArray *cellArray,
82  vtkPointData *internalPd)=0;
83 
94  virtual void Tessellate(vtkGenericAdaptorCell *cell,
97  vtkCellArray *cellArray,
98  vtkPointData *internalPd )=0;
99 
110  virtual void Triangulate(vtkGenericAdaptorCell *cell,
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 
134  void InitErrorMetrics(vtkGenericDataSet *ds);
135 
137 
140  vtkGetMacro(Measurement,int);
141  vtkSetMacro(Measurement,int);
143 
149  void GetMaxErrors(double *errors);
150 
151 protected:
153  ~vtkGenericCellTessellator() override;
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 
202 
209  void SetGenericCell(vtkGenericAdaptorCell *cell);
210 
215 
216  int Measurement; // if true, measure the quality of the fixed subdivision.
217  double *MaxErrors; // max error for each error metric, for measuring the
218  // quality of a fixed subdivision.
220 
221 private:
223  void operator=(const vtkGenericCellTessellator&) = delete;
224 };
225 
226 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
represent and manipulate point attribute data
Definition: vtkPointData.h:37
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
helper class to perform cell tessellation
int vtkIdType
Definition: vtkType.h:347
dynamic, self-adjusting array of double
iterator used to traverse cells
defines cell interface
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCollection * ErrorMetrics
List of error metrics.
object to represent cell connectivity
Definition: vtkCellArray.h:50
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
vtkGenericDataSet * DataSet
Dataset to be tessellated.
defines dataset interface