VTK  9.2.6
vtkTessellatorFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkTessellatorFilter.h
5 Language: C++
6 
7 Copyright 2003 Sandia Corporation.
8 Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 license for use of this work by or on behalf of the
10 U.S. Government. Redistribution and use in source and binary forms, with
11 or without modification, are permitted provided that this Notice and any
12 statement of authorship are reproduced on all copies.
13 
14 =========================================================================*/
15 #ifndef vtkTessellatorFilter_h
16 #define vtkTessellatorFilter_h
17 
59 #include "vtkFiltersGeneralModule.h" // For export macro
61 
62 class vtkDataArray;
63 class vtkDataSet;
65 class vtkPointLocator;
66 class vtkPoints;
70 
71 class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
72 {
73 public:
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
77  static vtkTessellatorFilter* New();
78 
79  virtual void SetTessellator(vtkStreamingTessellator*);
80  vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
81 
82  virtual void SetSubdivider(vtkDataSetEdgeSubdivisionCriterion*);
83  vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
84 
85  vtkMTimeType GetMTime() override;
86 
88 
96  vtkSetClampMacro(OutputDimension, int, 1, 3);
97  vtkGetMacro(OutputDimension, int);
99 
100 // With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
101 #if !VTK_USE_FUTURE_CONST
102  int GetOutputDimension() const;
103 #endif
104 
106 
111  virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in);
112  int GetMaximumNumberOfSubdivisions();
113  virtual void SetChordError(double ce);
114  double GetChordError();
116 
118 
121  virtual void ResetFieldCriteria();
122  virtual void SetFieldCriterion(int field, double err);
124 
126 
132  vtkGetMacro(MergePoints, vtkTypeBool);
133  vtkSetMacro(MergePoints, vtkTypeBool);
134  vtkBooleanMacro(MergePoints, vtkTypeBool);
136 
137 protected:
139  ~vtkTessellatorFilter() override;
140 
141  int FillInputPortInformation(int port, vtkInformation* info) override;
142 
148  void SetupOutput(vtkDataSet* input, vtkUnstructuredGrid* output);
149 
153  void MergeOutputPoints(vtkUnstructuredGrid* input, vtkUnstructuredGrid* output);
154 
158  void Teardown();
159 
163  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
164  vtkInformationVector* outputVector) override;
165 
171 
173 
182 
183  static void AddAPoint(const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
184  static void AddALine(
185  const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
186  static void AddATriangle(
187  const double*, const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
188  static void AddATetrahedron(const double*, const double*, const double*, const double*,
189  vtkEdgeSubdivisionCriterion*, void*, const void*);
190  void OutputPoint(const double*);
191  void OutputLine(const double*, const double*);
192  void OutputTriangle(const double*, const double*, const double*);
193  void OutputTetrahedron(const double*, const double*, const double*, const double*);
194 
195 private:
197  void operator=(const vtkTessellatorFilter&) = delete;
198 };
199 
200 // With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
201 #if !VTK_USE_FUTURE_CONST
203 {
204  return this->OutputDimension;
205 }
206 #endif
207 
208 #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:287
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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:69
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:39
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
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:39
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...