VTK  9.0.1
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 
56 #include "vtkFiltersGeneralModule.h" // For export macro
58 
59 class vtkDataArray;
60 class vtkDataSet;
62 class vtkPointLocator;
63 class vtkPoints;
67 
68 class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
69 {
70 public:
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
74  static vtkTessellatorFilter* New();
75 
76  virtual void SetTessellator(vtkStreamingTessellator*);
77  vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
78 
79  virtual void SetSubdivider(vtkDataSetEdgeSubdivisionCriterion*);
80  vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
81 
82  vtkMTimeType GetMTime() override;
83 
85 
93  vtkSetClampMacro(OutputDimension, int, 1, 3);
94  vtkGetMacro(OutputDimension, int);
96 
97  int GetOutputDimension() const;
98 
100 
105  virtual void SetMaximumNumberOfSubdivisions(int num_subdiv_in);
106  int GetMaximumNumberOfSubdivisions();
107  virtual void SetChordError(double ce);
108  double GetChordError();
110 
112 
115  virtual void ResetFieldCriteria();
116  virtual void SetFieldCriterion(int field, double chord);
118 
120 
126  vtkGetMacro(MergePoints, vtkTypeBool);
127  vtkSetMacro(MergePoints, vtkTypeBool);
128  vtkBooleanMacro(MergePoints, vtkTypeBool);
130 
131 protected:
133  ~vtkTessellatorFilter() override;
134 
135  int FillInputPortInformation(int port, vtkInformation* info) override;
136 
142  void SetupOutput(vtkDataSet* input, vtkUnstructuredGrid* output);
143 
147  void MergeOutputPoints(vtkUnstructuredGrid* input, vtkUnstructuredGrid* output);
148 
152  void Teardown();
153 
157  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
158  vtkInformationVector* outputVector) override;
159 
165 
167 
176 
177  static void AddAPoint(const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
178  static void AddALine(
179  const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
180  static void AddATriangle(
181  const double*, const double*, const double*, vtkEdgeSubdivisionCriterion*, void*, const void*);
182  static void AddATetrahedron(const double*, const double*, const double*, const double*,
183  vtkEdgeSubdivisionCriterion*, void*, const void*);
184  void OutputPoint(const double*);
185  void OutputLine(const double*, const double*);
186  void OutputTriangle(const double*, const double*, const double*);
187  void OutputTetrahedron(const double*, const double*, const double*, const double*);
188 
189 private:
191  void operator=(const vtkTessellatorFilter&) = delete;
192 };
193 
195 {
196  return this->OutputDimension;
197 }
198 
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:293
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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:33
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
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:33
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...