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 ) VTK_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() VTK_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,int);
127  vtkSetMacro(MergePoints,int);
128  vtkBooleanMacro(MergePoints,int);
130 
131 protected:
133  ~vtkTessellatorFilter() VTK_OVERRIDE;
134 
135  int FillInputPortInformation(int port, vtkInformation* info) VTK_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) VTK_OVERRIDE;
160 
163  int OutputDimension;
164  int MergePoints;
165  vtkPointLocator* Locator;
166 
168 
172  vtkUnstructuredGrid* OutputMesh;
173  vtkPoints* OutputPoints;
174  vtkDataArray** OutputAttributes;
175  int* OutputAttributeIndices;
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& ) VTK_DELETE_FUNCTION;
210  void operator = ( const vtkTessellatorFilter& ) VTK_DELETE_FUNCTION;
211 };
212 
213 inline int vtkTessellatorFilter::GetOutputDimension() const
214 {
215  return this->OutputDimension;
216 }
217 
218 #endif // vtkTessellatorFilter_h
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
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:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
static vtkUnstructuredGridAlgorithm * New()
approximate nonlinear FEM elements with simplices
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:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Superclass for algorithms that produce only unstructured grid as output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided ...
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:33