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) VTK_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() VTK_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 
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 
218 private:
219  vtkGenericCellTessellator(const vtkGenericCellTessellator&) VTK_DELETE_FUNCTION;
220  void operator=(const vtkGenericCellTessellator&) VTK_DELETE_FUNCTION;
221 };
222 
223 #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:287
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
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
Definition: vtkCellArray.h:50
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
defines dataset interface