VTK  9.1.0
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
115#include "vtkFiltersGeneralModule.h" // For export macro
117
118class vtkDataArray;
119class vtkDataSet;
121class vtkPointLocator;
122class vtkPoints;
126
127class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
128{
129public:
131 void PrintSelf(ostream& os, vtkIndent indent) override;
132
134
136 vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
137
139 vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
140
142
144
152 vtkSetClampMacro(OutputDimension, int, 1, 3);
153 vtkGetMacro(OutputDimension, int);
155
156 int GetOutputDimension() const;
157
159
164 virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in);
166 virtual void SetChordError(double ce);
169
171
174 virtual void ResetFieldCriteria();
175 virtual void SetFieldCriterion(int field, double err);
177
179
185 vtkGetMacro(MergePoints, vtkTypeBool);
186 vtkSetMacro(MergePoints, vtkTypeBool);
187 vtkBooleanMacro(MergePoints, vtkTypeBool);
189
190protected:
193
194 int FillInputPortInformation(int port, vtkInformation* info) override;
195
202
207
211 void Teardown();
212
217 vtkInformationVector* outputVector) override;
218
224
226
235
236 static void AddAPoint(const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
237 static void AddALine(
238 const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
239 static void AddATriangle(
240 const double*, const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
241 static void AddATetrahedron(const double*, const double*, const double*, const double*,
242 vtkEdgeSubdivisionCriterion*, void*, const void*);
243 void OutputPoint(const double*);
244 void OutputLine(const double*, const double*);
245 void OutputTriangle(const double*, const double*, const double*);
246 void OutputTetrahedron(const double*, const double*, const double*, const double*);
247
248private:
250 void operator=(const vtkTessellatorFilter&) = delete;
251};
252
254{
255 return this->OutputDimension;
256}
257
258#endif // vtkTessellatorFilter_h
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
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:113
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:143
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
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287