VTK: Filters/General/vtkTessellatorFilter.h Source File

| 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
57 #include "vtkFiltersGeneralModule.h" // For export macro
58 #include "vtkUnstructuredGridAlgorithm.h"
59
60 VTK_ABI_NAMESPACE_BEGIN
61 class vtkDataArray;
62 class vtkDataSet;
63 class vtkDataSetEdgeSubdivisionCriterion;
64 class vtkPointLocator;
65 class vtkPoints;
66 class vtkStreamingTessellator;
67 class vtkEdgeSubdivisionCriterion;
68 class vtkUnstructuredGrid;
69
70 class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
71 {
72 public:
73 vtkTypeMacro(vtkTessellatorFilter, vtkUnstructuredGridAlgorithm);
74 void PrintSelf(ostream& os, vtkIndent indent) override;
75
76 static vtkTessellatorFilter* New();
77
78 virtual void SetTessellator(vtkStreamingTessellator*);
79 vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
80
81 virtual void SetSubdivider(vtkDataSetEdgeSubdivisionCriterion*);
82 vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
83
84 vtkMTimeType GetMTime() override;
85
87
95 vtkSetClampMacro(OutputDimension, int, 1, 3);
96 vtkGetMacro(OutputDimension, int);
98
99 // With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
100 #if !VTK_USE_FUTURE_CONST
101 int GetOutputDimension() const;
102 #endif
103
105
110 virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in);
111 int GetMaximumNumberOfSubdivisions();
112 virtual void SetChordError(double ce);
113 double GetChordError();
115
117
120 virtual void ResetFieldCriteria();
121 virtual void SetFieldCriterion(int field, double err);
123
125
131 vtkGetMacro(MergePoints, vtkTypeBool);
132 vtkSetMacro(MergePoints, vtkTypeBool);
133 vtkBooleanMacro(MergePoints, vtkTypeBool);
135
136 protected:
137 vtkTessellatorFilter();
138 ~vtkTessellatorFilter() override;
139
140 int FillInputPortInformation(int port, vtkInformation* info) override;
141
147 void SetupOutput(vtkDataSet* input, vtkUnstructuredGrid* output);
148
152 void MergeOutputPoints(vtkUnstructuredGrid* input, vtkUnstructuredGrid* output);
153
157 void Teardown();
158
162 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
163 vtkInformationVector* outputVector) override;
164
165 vtkStreamingTessellator* Tessellator;
166 vtkDataSetEdgeSubdivisionCriterion* Subdivider;
167 int OutputDimension;
168 vtkTypeBool MergePoints;
169 vtkPointLocator* Locator;
170
172
176 vtkUnstructuredGrid* OutputMesh;
177 vtkPoints* OutputPoints;
178 vtkDataArray** OutputAttributes;
179 int* OutputAttributeIndices;
181
182 static void AddAPoint(const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
183 static void AddALine(
184 const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
185 static void AddATriangle(
186 const double*, const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
187 static void AddATetrahedron(const double*, const double*, const double*, const double*,
188 vtkEdgeSubdivisionCriterion*, void*, const void*);
189 void OutputPoint(const double*);
190 void OutputLine(const double*, const double*);
191 void OutputTriangle(const double*, const double*, const double*);
192 void OutputTetrahedron(const double*, const double*, const double*, const double*);
193
194 private:
195 vtkTessellatorFilter(const vtkTessellatorFilter&) = delete;
196 void operator=(const vtkTessellatorFilter&) = delete;
197 };
198
199 // With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
200 #if !VTK_USE_FUTURE_CONST
201 inline int vtkTessellatorFilter::GetOutputDimension() const
202 {
203 return this->OutputDimension;
204 }
205 #endif
206
207 VTK_ABI_NAMESPACE_END
208 #endif // vtkTessellatorFilter_h
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDataSetEdgeSubdivisionCriterion
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
Definition: vtkDataSetEdgeSubdivisionCriterion.h:36
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkEdgeSubdivisionCriterion
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided
Definition: vtkEdgeSubdivisionCriterion.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPointLocator
quickly locate points in 3-space
Definition: vtkPointLocator.h:59
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkStreamingTessellator
An algorithm that refines an initial simplicial tessellation using edge subdivision.
Definition: vtkStreamingTessellator.h:79
vtkTessellatorFilter
approximate nonlinear FEM elements with simplices
Definition: vtkTessellatorFilter.h:71
vtkTessellatorFilter::OutputTetrahedron
void OutputTetrahedron(const double *, const double *, const double *, const double *)
vtkTessellatorFilter::MergeOutputPoints
void MergeOutputPoints(vtkUnstructuredGrid *input, vtkUnstructuredGrid *output)
Called by RequestData to merge output points.
vtkTessellatorFilter::Locator
vtkPointLocator * Locator
Definition: vtkTessellatorFilter.h:169
vtkTessellatorFilter::SetSubdivider
virtual void SetSubdivider(vtkDataSetEdgeSubdivisionCriterion *)
vtkTessellatorFilter::SetChordError
virtual void SetChordError(double ce)
These are convenience routines for setting properties maintained by the tessellator and subdivider.
vtkTessellatorFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTessellatorFilter::SetTessellator
virtual void SetTessellator(vtkStreamingTessellator *)
vtkTessellatorFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkTessellatorFilter.h:168
vtkTessellatorFilter::~vtkTessellatorFilter
~vtkTessellatorFilter() override
vtkTessellatorFilter::SetupOutput
void SetupOutput(vtkDataSet *input, vtkUnstructuredGrid *output)
Called by RequestData to set up a multitude of member variables used by the per-primitive output func...
vtkTessellatorFilter::OutputPoints
vtkPoints * OutputPoints
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:177
vtkTessellatorFilter::OutputAttributes
vtkDataArray ** OutputAttributes
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:178
vtkTessellatorFilter::AddAPoint
static void AddAPoint(const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
vtkTessellatorFilter::SetFieldCriterion
virtual void SetFieldCriterion(int field, double err)
These methods are for the ParaView client.
vtkTessellatorFilter::AddATriangle
static void AddATriangle(const double *, const double *, const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
vtkTessellatorFilter::AddATetrahedron
static void AddATetrahedron(const double *, const double *, const double *, const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
vtkTessellatorFilter::GetMTime
vtkMTimeType GetMTime() override
Return this object's modified time.
vtkTessellatorFilter::New
static vtkTessellatorFilter * New()
vtkTessellatorFilter::ResetFieldCriteria
virtual void ResetFieldCriteria()
These methods are for the ParaView client.
vtkTessellatorFilter::GetMaximumNumberOfSubdivisions
int GetMaximumNumberOfSubdivisions()
These are convenience routines for setting properties maintained by the tessellator and subdivider.
vtkTessellatorFilter::Subdivider
vtkDataSetEdgeSubdivisionCriterion * Subdivider
Definition: vtkTessellatorFilter.h:166
vtkTessellatorFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTessellatorFilter::Teardown
void Teardown()
Reset the temporary variables used during the filter's RequestData() method.
vtkTessellatorFilter::OutputAttributeIndices
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:179
vtkTessellatorFilter::GetOutputDimension
virtual int GetOutputDimension()
Set the dimension of the output tessellation.
vtkTessellatorFilter::OutputTriangle
void OutputTriangle(const double *, const double *, const double *)
vtkTessellatorFilter::vtkTessellatorFilter
vtkTessellatorFilter()
vtkTessellatorFilter::OutputMesh
vtkUnstructuredGrid * OutputMesh
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:176
vtkTessellatorFilter::OutputLine
void OutputLine(const double *, const double *)
vtkTessellatorFilter::OutputPoint
void OutputPoint(const double *)
vtkTessellatorFilter::AddALine
static void AddALine(const double *, const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
vtkTessellatorFilter::GetChordError
double GetChordError()
These are convenience routines for setting properties maintained by the tessellator and subdivider.
vtkTessellatorFilter::SetMaximumNumberOfSubdivisions
virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in)
These are convenience routines for setting properties maintained by the tessellator and subdivider.
vtkTessellatorFilter::Tessellator
vtkStreamingTessellator * Tessellator
Definition: vtkTessellatorFilter.h:165
vtkTessellatorFilter::OutputDimension
int OutputDimension
Definition: vtkTessellatorFilter.h:167
vtkTessellatorFilter::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Run the filter; produce a polygonal approximation to the grid.
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:30
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:99
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
vtkUnstructuredGridAlgorithm.h