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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkStreamingTessellator
An algorithm that refines an initial simplicial tessellation using edge subdivision.
Definition: vtkStreamingTessellator.h:85
vtkTessellatorFilter::Subdivider
vtkDataSetEdgeSubdivisionCriterion * Subdivider
Definition: vtkTessellatorFilter.h:161
vtkTessellatorFilter::OutputPoints
vtkPoints * OutputPoints
Definition: vtkTessellatorFilter.h:172
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPointLocator
quickly locate points in 3-space
Definition: vtkPointLocator.h:50
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkTessellatorFilter::Locator
vtkPointLocator * Locator
Definition: vtkTessellatorFilter.h:164
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkEdgeSubdivisionCriterion
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided
Definition: vtkEdgeSubdivisionCriterion.h:43
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTessellatorFilter::GetOutputDimension
virtual int GetOutputDimension()
Definition: vtkTessellatorFilter.h:194
vtkX3D::field
@ field
Definition: vtkX3D.h:183
vtkDataSetEdgeSubdivisionCriterion
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
Definition: vtkDataSetEdgeSubdivisionCriterion.h:45
vtkUnstructuredGridAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkTessellatorFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkTessellatorFilter.h:163
vtkTessellatorFilter::Tessellator
vtkStreamingTessellator * Tessellator
Definition: vtkTessellatorFilter.h:160
vtkTessellatorFilter::OutputMesh
vtkUnstructuredGrid * OutputMesh
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:171
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkTessellatorFilter::OutputDimension
int OutputDimension
Definition: vtkTessellatorFilter.h:162
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:92
vtkTessellatorFilter::OutputAttributeIndices
int * OutputAttributeIndices
Definition: vtkTessellatorFilter.h:174
vtkTessellatorFilter
approximate nonlinear FEM elements with simplices
Definition: vtkTessellatorFilter.h:68
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkTessellatorFilter::OutputAttributes
vtkDataArray ** OutputAttributes
Definition: vtkTessellatorFilter.h:173
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293