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 ) 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() 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,vtkTypeBool);
130  vtkSetMacro(MergePoints,vtkTypeBool);
131  vtkBooleanMacro(MergePoints,vtkTypeBool);
133 
134 protected:
136  ~vtkTessellatorFilter() override;
137 
138  int FillInputPortInformation(int port, vtkInformation* info) 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) override;
163 
169 
171 
180 
181  static void AddAPoint( const double*,
183  void*,
184  const void* );
185  static void AddALine( const double*,
186  const double*,
188  void*,
189  const void* );
190  static void AddATriangle( const double*,
191  const double*,
192  const double*,
194  void*,
195  const void* );
196  static void AddATetrahedron( const double*,
197  const double*,
198  const double*,
199  const double*,
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& ) = delete;
213  void operator = ( const vtkTessellatorFilter& ) = delete;
214 };
215 
217 {
218  return this->OutputDimension;
219 }
220 
221 #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:302
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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: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.
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:39
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...