VTK  9.2.6
vtkTessellatorFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3Program: Visualization Toolkit
4Module: vtkTessellatorFilter.h
5Language: C++
6
7Copyright 2003 Sandia Corporation.
8Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9license for use of this work by or on behalf of the
10U.S. Government. Redistribution and use in source and binary forms, with
11or without modification, are permitted provided that this Notice and any
12statement of authorship are reproduced on all copies.
13
14=========================================================================*/
15#ifndef vtkTessellatorFilter_h
16#define vtkTessellatorFilter_h
17
118#include "vtkFiltersGeneralModule.h" // For export macro
120
121class vtkDataArray;
122class vtkDataSet;
124class vtkPointLocator;
125class vtkPoints;
129
130class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
131{
132public:
134 void PrintSelf(ostream& os, vtkIndent indent) override;
135
137
139 vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
140
142 vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
143
145
147
155 vtkSetClampMacro(OutputDimension, int, 1, 3);
156 vtkGetMacro(OutputDimension, int);
158
159// With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
160#if !VTK_USE_FUTURE_CONST
161 int GetOutputDimension() const;
162#endif
163
165
170 virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in);
172 virtual void SetChordError(double ce);
175
177
180 virtual void ResetFieldCriteria();
181 virtual void SetFieldCriterion(int field, double err);
183
185
191 vtkGetMacro(MergePoints, vtkTypeBool);
192 vtkSetMacro(MergePoints, vtkTypeBool);
193 vtkBooleanMacro(MergePoints, vtkTypeBool);
195
196protected:
199
201
208
213
217 void Teardown();
218
223 vtkInformationVector* outputVector) override;
224
230
232
241
242 static void AddAPoint(const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
243 static void AddALine(
244 const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
245 static void AddATriangle(
246 const double*, const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
247 static void AddATetrahedron(const double*, const double*, const double*, const double*,
248 vtkEdgeSubdivisionCriterion*, void*, const void*);
249 void OutputPoint(const double*);
250 void OutputLine(const double*, const double*);
251 void OutputTriangle(const double*, const double*, const double*);
252 void OutputTetrahedron(const double*, const double*, const double*, const double*);
253
254private:
256 void operator=(const vtkTessellatorFilter&) = delete;
257};
258
259// With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
260#if !VTK_USE_FUTURE_CONST
262{
263 return this->OutputDimension;
264}
265#endif
266
267#endif // vtkTessellatorFilter_h
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:165
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
quickly locate points in 3-space
represent and manipulate 3D points
Definition: vtkPoints.h:149
An algorithm that refines an initial simplicial tessellation using edge subdivision.
approximate nonlinear FEM elements with simplices
void OutputTetrahedron(const double *, const double *, const double *, const double *)
void MergeOutputPoints(vtkUnstructuredGrid *input, vtkUnstructuredGrid *output)
Called by RequestData to merge output points.
vtkPointLocator * Locator
virtual void SetSubdivider(vtkDataSetEdgeSubdivisionCriterion *)
virtual void SetChordError(double ce)
These are convenience routines for setting properties maintained by the tessellator and subdivider.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetTessellator(vtkStreamingTessellator *)
~vtkTessellatorFilter() override
void SetupOutput(vtkDataSet *input, vtkUnstructuredGrid *output)
Called by RequestData to set up a multitude of member variables used by the per-primitive output func...
vtkPoints * OutputPoints
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
vtkDataArray ** OutputAttributes
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
static void AddAPoint(const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
virtual void SetFieldCriterion(int field, double err)
These methods are for the ParaView client.
static void AddATriangle(const double *, const double *, const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
static void AddATetrahedron(const double *, const double *, const double *, const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
vtkMTimeType GetMTime() override
Return this object's modified time.
virtual void ResetFieldCriteria()
These methods are for the ParaView client.
int GetMaximumNumberOfSubdivisions()
These are convenience routines for setting properties maintained by the tessellator and subdivider.
vtkDataSetEdgeSubdivisionCriterion * Subdivider
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void Teardown()
Reset the temporary variables used during the filter's RequestData() method.
static vtkTessellatorFilter * New()
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
virtual int GetOutputDimension()
Set the dimension of the output tessellation.
void OutputTriangle(const double *, const double *, const double *)
vtkUnstructuredGrid * OutputMesh
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
void OutputLine(const double *, const double *)
void OutputPoint(const double *)
static void AddALine(const double *, const double *, vtkEdgeSubdivisionCriterion *, void *, const void *)
double GetChordError()
These are convenience routines for setting properties maintained by the tessellator and subdivider.
virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in)
These are convenience routines for setting properties maintained by the tessellator and subdivider.
vtkStreamingTessellator * Tessellator
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Run the filter; produce a polygonal approximation to the grid.
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
@ field
Definition: vtkX3D.h:183
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287