VTK  9.2.6
vtkStaticCleanUnstructuredGrid.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkStaticCleanUnstructuredGrid.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=========================================================================*/
69
70#ifndef vtkStaticCleanUnstructuredGrid_h
71#define vtkStaticCleanUnstructuredGrid_h
72
73#include "vtkFiltersCoreModule.h" // For export macro
74#include "vtkSmartPointer.h" // Pointer to locator
75#include "vtkStaticPointLocator.h" // Locator
77#include <vector> // API to vtkStaticCleanUnstructuredGrid
78
79class vtkCellArray;
80class vtkCellData;
81class vtkPointData;
82class vtkPoints;
83
85{
86public:
88
93 void PrintSelf(ostream& os, vtkIndent indent) override;
96
98
104 vtkSetMacro(ToleranceIsAbsolute, bool);
105 vtkBooleanMacro(ToleranceIsAbsolute, bool);
106 vtkGetMacro(ToleranceIsAbsolute, bool);
108
110
114 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
115 vtkGetMacro(AbsoluteTolerance, double);
117
119
124 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
125 vtkGetMacro(Tolerance, double);
127
129
140 vtkSetStringMacro(MergingArray);
141 vtkGetStringMacro(MergingArray);
143
145
152 vtkSetMacro(RemoveUnusedPoints, bool);
153 vtkBooleanMacro(RemoveUnusedPoints, bool);
154 vtkGetMacro(RemoveUnusedPoints, bool);
156
158
165 vtkSetMacro(ProduceMergeMap, bool);
166 vtkBooleanMacro(ProduceMergeMap, bool);
167 vtkGetMacro(ProduceMergeMap, bool);
169
171
179 vtkSetMacro(AveragePointData, bool);
180 vtkBooleanMacro(AveragePointData, bool);
181 vtkGetMacro(AveragePointData, bool);
183
185
190 vtkSetMacro(OutputPointsPrecision, int);
191 vtkGetMacro(OutputPointsPrecision, int);
193
199 vtkGetObjectMacro(Locator, vtkStaticPointLocator);
200
202 // This filter is difficult to stream. To produce invariant results, the
203 // whole input must be processed at once. This flag allows the user to
204 // select whether strict piece invariance is required. By default it is
205 // on. When off, the filter can stream, but results may change.
206 vtkSetMacro(PieceInvariant, bool);
207 vtkGetMacro(PieceInvariant, bool);
208 vtkBooleanMacro(PieceInvariant, bool);
210
215
216protected:
219
220 // Usual data generation method
223
225 double Tolerance;
233
234 // Internal locator for performing point merging
236
237 // These methods are made static so that vtkStaticCleanPolyData can use them
239 static void MarkPointUses(vtkCellArray* ca, vtkIdType* mergeMap, unsigned char* ptUses);
241 vtkIdType numPts, vtkIdType* pmap, unsigned char* ptUses, std::vector<vtkIdType>& mergeMap);
242 static void CopyPoints(
243 vtkPoints* inPts, vtkPointData* inPD, vtkPoints* outPts, vtkPointData* outPD, vtkIdType* ptMap);
244 static void AveragePoints(vtkPoints* inPts, vtkPointData* inPD, vtkPoints* outPts,
245 vtkPointData* outPD, vtkIdType* ptMap, double tol);
246
247private:
249 void operator=(const vtkStaticCleanUnstructuredGrid&) = delete;
250};
251
252#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:36
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:34
Hold a reference to a vtkObjectBase instance.
static vtkStaticCleanUnstructuredGrid * New()
Standard methods for instantiation, obtaining type information, and printing the state of the object.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkMTimeType GetMTime() override
Get the MTime of this object also considering the locator.
~vtkStaticCleanUnstructuredGrid() override=default
vtkSmartPointer< vtkStaticPointLocator > Locator
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing the state of the object.
static void MarkPointUses(vtkCellArray *ca, vtkIdType *mergeMap, unsigned char *ptUses)
static vtkIdType BuildPointMap(vtkIdType numPts, vtkIdType *pmap, unsigned char *ptUses, std::vector< vtkIdType > &mergeMap)
static void AveragePoints(vtkPoints *inPts, vtkPointData *inPD, vtkPoints *outPts, vtkPointData *outPD, vtkIdType *ptMap, double tol)
static void CopyPoints(vtkPoints *inPts, vtkPointData *inPD, vtkPoints *outPts, vtkPointData *outPD, vtkIdType *ptMap)
quickly locate points in 3-space
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_DOUBLE_MAX
Definition vtkType.h:165