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 =========================================================================*/
39 #ifndef vtkGenericCellTessellator_h
40 #define vtkGenericCellTessellator_h
41 
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkObject.h"
44 
45 class vtkCellArray;
46 class vtkDoubleArray;
47 class vtkCollection;
51 class vtkPointData;
52 class vtkGenericDataSet;
53 
54 //-----------------------------------------------------------------------------
55 //
56 // The tessellation object
58 {
59 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
71  virtual void TessellateFace(vtkGenericAdaptorCell *cell,
75  vtkCellArray *cellArray,
76  vtkPointData *internalPd)=0;
78 
80 
86  virtual void Tessellate(vtkGenericAdaptorCell *cell,
89  vtkCellArray *cellArray,
90  vtkPointData *internalPd )=0;
92 
94 
100  virtual void Triangulate(vtkGenericAdaptorCell *cell,
103  vtkCellArray *cellArray,
104  vtkPointData *internalPd)=0;
106 
108 
111  virtual void SetErrorMetrics(vtkCollection *someErrorMetrics);
112  vtkGetObjectMacro(ErrorMetrics,vtkCollection);
114 
116  virtual void Initialize(vtkGenericDataSet *ds)=0;
117 
120  void InitErrorMetrics(vtkGenericDataSet *ds);
121 
123 
124  vtkGetMacro(Measurement,int);
125  vtkSetMacro(Measurement,int);
127 
131  void GetMaxErrors(double *errors);
132 
133 protected:
136 
138 
150  int RequiresEdgeSubdivision(double *left, double *mid, double *right,
151  double alpha);
153 
154 
156 
165  virtual void UpdateMaxError(double *leftPoint, double *midPoint,
166  double *rightPoint, double alpha);
168 
171  void ResetMaxErrors();
172 
175 
179  void SetGenericCell(vtkGenericAdaptorCell *cell);
180 
182 
183  int Measurement; // if true, measure the quality of the fixed subdivision.
184  double *MaxErrors; // max error for each error metric, for measuring the
185  // quality of a fixed subdivision.
187 
188 private:
189  vtkGenericCellTessellator(const vtkGenericCellTessellator&); // Not implemented.
190  void operator=(const vtkGenericCellTessellator&); // Not implemented.
191 };
192 
193 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
represent and manipulate point attribute data
Definition: vtkPointData.h:36
helper class to perform cell tessellation
int vtkIdType
Definition: vtkType.h:275
dynamic, self-adjusting array of double
iterator used to traverse cells
defines cell interface
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
object to represent cell connectivity
Definition: vtkCellArray.h:49
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
defines dataset interface
#define VTKCOMMONDATAMODEL_EXPORT