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
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:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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: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.
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:33
int * OutputAttributeIndices
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...