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 
59 #include "vtkFiltersGeneralModule.h" // For export macro
61 
62 class vtkDataArray;
63 class vtkDataSet;
65 class vtkPointLocator;
66 class vtkPoints;
70 
71 class VTKFILTERSGENERAL_EXPORT vtkTessellatorFilter : public vtkUnstructuredGridAlgorithm
72 {
73 public:
75  void PrintSelf( ostream& os, vtkIndent indent ) VTK_OVERRIDE;
76 
77  static vtkTessellatorFilter* New();
78 
79  virtual void SetTessellator( vtkStreamingTessellator* );
80  vtkGetObjectMacro(Tessellator, vtkStreamingTessellator);
81 
82  virtual void SetSubdivider( vtkDataSetEdgeSubdivisionCriterion* );
83  vtkGetObjectMacro(Subdivider, vtkDataSetEdgeSubdivisionCriterion);
84 
85  vtkMTimeType GetMTime() VTK_OVERRIDE;
86 
88 
96  vtkSetClampMacro(OutputDimension,int,1,3);
97  vtkGetMacro(OutputDimension,int);
99 
100  int GetOutputDimension() const;
101 
103 
108  virtual void SetMaximumNumberOfSubdivisions( int num_subdiv_in );
109  int GetMaximumNumberOfSubdivisions();
110  virtual void SetChordError( double ce );
111  double GetChordError();
113 
115 
118  virtual void ResetFieldCriteria();
119  virtual void SetFieldCriterion( int field, double chord );
121 
123 
129  vtkGetMacro(MergePoints,int);
130  vtkSetMacro(MergePoints,int);
131  vtkBooleanMacro(MergePoints,int);
133 
134 protected:
136  ~vtkTessellatorFilter() VTK_OVERRIDE;
137 
138  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
139 
145  void SetupOutput( vtkDataSet* input, vtkUnstructuredGrid* output );
146 
150  void MergeOutputPoints( vtkUnstructuredGrid* input, vtkUnstructuredGrid* output );
151 
155  void Teardown();
156 
160  int RequestData(vtkInformation* request,
161  vtkInformationVector** inputVector,
162  vtkInformationVector* outputVector) VTK_OVERRIDE;
163 
166  int OutputDimension;
167  int MergePoints;
168  vtkPointLocator* Locator;
169 
171 
175  vtkUnstructuredGrid* OutputMesh;
176  vtkPoints* OutputPoints;
177  vtkDataArray** OutputAttributes;
178  int* OutputAttributeIndices;
180 
181  static void AddAPoint( const double*,
183  void*,
184  const void* );
185  static void AddALine( const double*,
186  const double*,
187  vtkEdgeSubdivisionCriterion*,
188  void*,
189  const void* );
190  static void AddATriangle( const double*,
191  const double*,
192  const double*,
193  vtkEdgeSubdivisionCriterion*,
194  void*,
195  const void* );
196  static void AddATetrahedron( const double*,
197  const double*,
198  const double*,
199  const double*,
200  vtkEdgeSubdivisionCriterion*,
201  void*,
202  const void* );
203  void OutputPoint( const double* );
204  void OutputLine( const double*, const double* );
205  void OutputTriangle( const double*, const double*, const double* );
206  void OutputTetrahedron( const double*,
207  const double*,
208  const double*,
209  const double* );
210 
211 private:
212  vtkTessellatorFilter( const vtkTessellatorFilter& ) VTK_DELETE_FUNCTION;
213  void operator = ( const vtkTessellatorFilter& ) VTK_DELETE_FUNCTION;
214 };
215 
216 inline int vtkTessellatorFilter::GetOutputDimension() const
217 {
218  return this->OutputDimension;
219 }
220 
221 #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.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
static vtkUnstructuredGridAlgorithm * New()
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
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:39
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
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:39