VTK  9.3.1
vtkTessellatorFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2003 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-NVIDIA-USGov
4 #ifndef vtkTessellatorFilter_h
5 #define vtkTessellatorFilter_h
6 
48 #include "vtkFiltersGeneralModule.h" // For export macro
50 
51 VTK_ABI_NAMESPACE_BEGIN
52 class vtkDataArray;
53 class vtkDataSet;
55 class vtkPointLocator;
56 class vtkPoints;
60 
61 class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
62 {
63 public:
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
67  static vtkTessellatorFilter* New();
68 
69  virtual void SetTessellator(vtkStreamingTessellator*);
70  vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
71 
72  virtual void SetSubdivider(vtkDataSetEdgeSubdivisionCriterion*);
73  vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
74 
75  vtkMTimeType GetMTime() override;
76 
78 
86  vtkSetClampMacro(OutputDimension, int, 1, 3);
87  vtkGetMacro(OutputDimension, int);
89 
90 // With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
91 #if !VTK_USE_FUTURE_CONST
92  int GetOutputDimension() const;
93 #endif
94 
96 
101  virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in);
102  int GetMaximumNumberOfSubdivisions();
103  virtual void SetChordError(double ce);
104  double GetChordError();
106 
108 
111  virtual void ResetFieldCriteria();
112  virtual void SetFieldCriterion(int field, double err);
114 
116 
122  vtkGetMacro(MergePoints, vtkTypeBool);
123  vtkSetMacro(MergePoints, vtkTypeBool);
124  vtkBooleanMacro(MergePoints, vtkTypeBool);
126 
127 protected:
129  ~vtkTessellatorFilter() override;
130 
131  int FillInputPortInformation(int port, vtkInformation* info) override;
132 
138  void SetupOutput(vtkDataSet* input, vtkUnstructuredGrid* output);
139 
143  void MergeOutputPoints(vtkUnstructuredGrid* input, vtkUnstructuredGrid* output);
144 
148  void Teardown();
149 
153  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
154  vtkInformationVector* outputVector) override;
155 
161 
163 
172 
173  static void AddAPoint(const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
174  static void AddALine(
175  const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
176  static void AddATriangle(
177  const double*, const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
178  static void AddATetrahedron(const double*, const double*, const double*, const double*,
179  vtkEdgeSubdivisionCriterion*, void*, const void*);
180  void OutputPoint(const double*);
181  void OutputLine(const double*, const double*);
182  void OutputTriangle(const double*, const double*, const double*);
183  void OutputTetrahedron(const double*, const double*, const double*, const double*);
184 
185 private:
187  void operator=(const vtkTessellatorFilter&) = delete;
188 };
189 
190 // With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
191 #if !VTK_USE_FUTURE_CONST
193 {
194  return this->OutputDimension;
195 }
196 #endif
197 
198 VTK_ABI_NAMESPACE_END
199 #endif // vtkTessellatorFilter_h
vtkPointLocator * Locator
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkUnstructuredGrid * OutputMesh
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
An algorithm that refines an initial simplicial tessellation using edge subdivision.
quickly locate points in 3-space
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
static vtkUnstructuredGridAlgorithm * New()
vtkPoints * OutputPoints
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
vtkDataSetEdgeSubdivisionCriterion * Subdivider
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
approximate nonlinear FEM elements with simplices
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Superclass for algorithms that produce only unstructured grid as output.
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided ...
vtkDataArray ** OutputAttributes
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Store zero or more vtkInformation instances.
vtkStreamingTessellator * Tessellator
virtual int GetOutputDimension()
Set the dimension of the output tessellation.
represent and manipulate 3D points
Definition: vtkPoints.h:28
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...