VTK
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,
158  vtkInformationVector** inputVector,
159  vtkInformationVector* outputVector) override;
160 
166 
168 
177 
178  static void AddAPoint( const double*,
180  void*,
181  const void* );
182  static void AddALine( const double*,
183  const double*,
185  void*,
186  const void* );
187  static void AddATriangle( const double*,
188  const double*,
189  const double*,
191  void*,
192  const void* );
193  static void AddATetrahedron( const double*,
194  const double*,
195  const double*,
196  const double*,
198  void*,
199  const void* );
200  void OutputPoint( const double* );
201  void OutputLine( const double*, const double* );
202  void OutputTriangle( const double*, const double*, const double* );
203  void OutputTetrahedron( const double*,
204  const double*,
205  const double*,
206  const double* );
207 
208 private:
209  vtkTessellatorFilter( const vtkTessellatorFilter& ) = delete;
210  void operator = ( const vtkTessellatorFilter& ) = delete;
211 };
212 
214 {
215  return this->OutputDimension;
216 }
217 
218 #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:162
vtkTessellatorFilter::OutputPoints
vtkPoints * OutputPoints
Definition: vtkTessellatorFilter.h:173
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:48
vtkTessellatorFilter::Locator
vtkPointLocator * Locator
Definition: vtkTessellatorFilter.h:165
vtkX3D::port
Definition: vtkX3D.h:447
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:42
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
vtkX3D::field
Definition: vtkX3D.h:177
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:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkTessellatorFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkTessellatorFilter.h:164
vtkTessellatorFilter::Tessellator
vtkStreamingTessellator * Tessellator
Definition: vtkTessellatorFilter.h:161
vtkTessellatorFilter::OutputMesh
vtkUnstructuredGrid * OutputMesh
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:172
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkTessellatorFilter::GetOutputDimension
virtual int GetOutputDimension()
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:163
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81
vtkTessellatorFilter::OutputAttributeIndices
int * OutputAttributeIndices
Definition: vtkTessellatorFilter.h:175
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:174
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302