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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkStreamingTessellator
An algorithm that refines an initial simplicial tessellation using edge subdivision.
Definition: vtkStreamingTessellator.h:88
vtkTessellatorFilter::Subdivider
vtkDataSetEdgeSubdivisionCriterion * Subdivider
Definition: vtkTessellatorFilter.h:165
vtkTessellatorFilter::OutputPoints
vtkPoints * OutputPoints
Definition: vtkTessellatorFilter.h:176
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPointLocator
quickly locate points in 3-space
Definition: vtkPointLocator.h:53
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkTessellatorFilter::Locator
vtkPointLocator * Locator
Definition: vtkTessellatorFilter.h:168
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:45
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:39
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:62
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkTessellatorFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkTessellatorFilter.h:167
vtkTessellatorFilter::Tessellator
vtkStreamingTessellator * Tessellator
Definition: vtkTessellatorFilter.h:164
vtkTessellatorFilter::OutputMesh
vtkUnstructuredGrid * OutputMesh
These member variables are set by SetupOutput for use inside the callback members OutputLine and Outp...
Definition: vtkTessellatorFilter.h:175
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:166
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:87
vtkTessellatorFilter::OutputAttributeIndices
int * OutputAttributeIndices
Definition: vtkTessellatorFilter.h:178
vtkTessellatorFilter
approximate nonlinear FEM elements with simplices
Definition: vtkTessellatorFilter.h:71
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkTessellatorFilter::OutputAttributes
vtkDataArray ** OutputAttributes
Definition: vtkTessellatorFilter.h:177
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302