VTK
vtkParametricFunctionSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkParametricFunctionSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
50#ifndef vtkParametricFunctionSource_h
51#define vtkParametricFunctionSource_h
52
53#include "vtkFiltersSourcesModule.h" // For export macro
55
56class vtkCellArray;
58
59class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
60{
61public:
63 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
64
69
71
75 vtkGetObjectMacro(ParametricFunction,vtkParametricFunction);
77
79
84 vtkSetClampMacro(UResolution,int,2,VTK_INT_MAX);
85 vtkGetMacro(UResolution,int);
87
89
94 vtkSetClampMacro(VResolution,int,2,VTK_INT_MAX);
95 vtkGetMacro(VResolution,int);
97
99
104 vtkSetClampMacro(WResolution,int,2,VTK_INT_MAX);
105 vtkGetMacro(WResolution,int);
107
109
116 vtkBooleanMacro(GenerateTextureCoordinates,int);
117 vtkSetClampMacro(GenerateTextureCoordinates,int,0,1);
118 vtkGetMacro(GenerateTextureCoordinates,int);
120
122
128 vtkBooleanMacro(GenerateNormals,int);
129 vtkSetClampMacro(GenerateNormals,int,0,1);
130 vtkGetMacro(GenerateNormals,int);
132
160 enum SCALAR_MODE { SCALAR_NONE = 0,
161 SCALAR_U, SCALAR_V,
162 SCALAR_U0, SCALAR_V0, SCALAR_U0V0,
163 SCALAR_MODULUS, SCALAR_PHASE, SCALAR_QUADRANT,
164 SCALAR_X, SCALAR_Y, SCALAR_Z, SCALAR_DISTANCE,
165 SCALAR_FUNCTION_DEFINED };
166
168
172 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
173 vtkGetMacro(ScalarMode, int);
174 void SetScalarModeToNone( void ) {this->SetScalarMode(SCALAR_NONE);}
175 void SetScalarModeToU( void ) {this->SetScalarMode(SCALAR_U);}
176 void SetScalarModeToV( void ) {this->SetScalarMode(SCALAR_V);}
177 void SetScalarModeToU0( void ) {this->SetScalarMode(SCALAR_U0);}
178 void SetScalarModeToV0( void ) {this->SetScalarMode(SCALAR_V0);}
179 void SetScalarModeToU0V0( void ) {this->SetScalarMode(SCALAR_U0V0);}
180 void SetScalarModeToModulus( void ) {this->SetScalarMode(SCALAR_MODULUS);}
181 void SetScalarModeToPhase( void ) {this->SetScalarMode(SCALAR_PHASE);}
182 void SetScalarModeToQuadrant( void ) {this->SetScalarMode(SCALAR_QUADRANT);}
183 void SetScalarModeToX( void ) {this->SetScalarMode(SCALAR_X);}
184 void SetScalarModeToY( void ) {this->SetScalarMode(SCALAR_Y);}
185 void SetScalarModeToZ( void ) {this->SetScalarMode(SCALAR_Z);}
186 void SetScalarModeToDistance( void ) {this->SetScalarMode(SCALAR_DISTANCE);}
188 {this->SetScalarMode(SCALAR_FUNCTION_DEFINED);}
190
194 vtkMTimeType GetMTime() VTK_OVERRIDE;
195
197
202 vtkSetMacro(OutputPointsPrecision,int);
203 vtkGetMacro(OutputPointsPrecision,int);
205
206protected:
209
210 // Usual data generation method
211 int RequestData(vtkInformation *info, vtkInformationVector **input,
212 vtkInformationVector *output) VTK_OVERRIDE;
213
214 // Variables
215 vtkParametricFunction *ParametricFunction;
216
217 int UResolution;
218 int VResolution;
219 int WResolution;
220 int GenerateTextureCoordinates;
221 int GenerateNormals;
222 int ScalarMode;
223 int OutputPointsPrecision;
224
225private:
226 // Create output depending on function dimension
227 void Produce1DOutput(vtkInformationVector *output);
228 void Produce2DOutput(vtkInformationVector *output);
229
241 void MakeTriangles ( vtkCellArray * strips, int PtsU, int PtsV );
242
244 void operator=(const vtkParametricFunctionSource&) VTK_DELETE_FUNCTION;
245
246};
247
248#endif
object to represent cell connectivity
Definition: vtkCellArray.h:51
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
tessellate parametric functions
vtkMTimeType GetMTime() override
Return the MTime also considering the parametric function.
SCALAR_MODE
Enumerate the supported scalar generation modes.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkParametricFunctionSource * New()
Create a new instance with (50,50,50) points in the (u-v-w) directions.
virtual void SetParametricFunction(vtkParametricFunction *)
Specify the parametric function to use to generate the tessellation.
abstract interface for parametric functions
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:376
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
#define VTK_INT_MAX
Definition: vtkType.h:153