VTK  9.1.0
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=========================================================================*/
47#ifndef vtkParametricFunctionSource_h
48#define vtkParametricFunctionSource_h
49
50#include "vtkFiltersSourcesModule.h" // For export macro
52
53class vtkCellArray;
55
56class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
57{
58public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
66
68
72 vtkGetObjectMacro(ParametricFunction, vtkParametricFunction);
74
76
81 vtkSetClampMacro(UResolution, int, 2, VTK_INT_MAX);
82 vtkGetMacro(UResolution, int);
84
86
91 vtkSetClampMacro(VResolution, int, 2, VTK_INT_MAX);
92 vtkGetMacro(VResolution, int);
94
96
101 vtkSetClampMacro(WResolution, int, 2, VTK_INT_MAX);
102 vtkGetMacro(WResolution, int);
104
106
113 vtkBooleanMacro(GenerateTextureCoordinates, vtkTypeBool);
114 vtkSetClampMacro(GenerateTextureCoordinates, vtkTypeBool, 0, 1);
115 vtkGetMacro(GenerateTextureCoordinates, vtkTypeBool);
117
119
125 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
126 vtkSetClampMacro(GenerateNormals, vtkTypeBool, 0, 1);
127 vtkGetMacro(GenerateNormals, vtkTypeBool);
129
158 {
159 SCALAR_NONE = 0,
172 SCALAR_FUNCTION_DEFINED
173 };
174
176
180 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
181 vtkGetMacro(ScalarMode, int);
182 void SetScalarModeToNone(void) { this->SetScalarMode(SCALAR_NONE); }
183 void SetScalarModeToU(void) { this->SetScalarMode(SCALAR_U); }
184 void SetScalarModeToV(void) { this->SetScalarMode(SCALAR_V); }
185 void SetScalarModeToU0(void) { this->SetScalarMode(SCALAR_U0); }
186 void SetScalarModeToV0(void) { this->SetScalarMode(SCALAR_V0); }
187 void SetScalarModeToU0V0(void) { this->SetScalarMode(SCALAR_U0V0); }
188 void SetScalarModeToModulus(void) { this->SetScalarMode(SCALAR_MODULUS); }
189 void SetScalarModeToPhase(void) { this->SetScalarMode(SCALAR_PHASE); }
190 void SetScalarModeToQuadrant(void) { this->SetScalarMode(SCALAR_QUADRANT); }
191 void SetScalarModeToX(void) { this->SetScalarMode(SCALAR_X); }
192 void SetScalarModeToY(void) { this->SetScalarMode(SCALAR_Y); }
193 void SetScalarModeToZ(void) { this->SetScalarMode(SCALAR_Z); }
194 void SetScalarModeToDistance(void) { this->SetScalarMode(SCALAR_DISTANCE); }
195 void SetScalarModeToFunctionDefined(void) { this->SetScalarMode(SCALAR_FUNCTION_DEFINED); }
197
202
204
209 vtkSetMacro(OutputPointsPrecision, int);
210 vtkGetMacro(OutputPointsPrecision, int);
212
213protected:
216
217 // Usual data generation method
220
221 // Variables
223
231
232private:
233 // Create output depending on function dimension
234 void Produce1DOutput(vtkInformationVector* output);
235 void Produce2DOutput(vtkInformationVector* output);
236
248 void MakeTriangles(vtkCellArray* strips, int PtsU, int PtsV);
249
251 void operator=(const vtkParametricFunctionSource&) = delete;
252};
253
254#endif
object to represent cell connectivity
Definition: vtkCellArray.h:181
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
tessellate parametric functions
void SetScalarModeToV0(void)
Get/Set the mode used for the scalar data.
int RequestData(vtkInformation *info, vtkInformationVector **input, vtkInformationVector *output) override
This is called by the superclass.
void SetScalarModeToY(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToX(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToU0(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToU0V0(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToV(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToU(void)
Get/Set the mode used for the scalar data.
vtkParametricFunction * ParametricFunction
vtkMTimeType GetMTime() override
Return the MTime also considering the parametric function.
void SetScalarModeToPhase(void)
Get/Set the mode used for the scalar data.
SCALAR_MODE
Enumerate the supported scalar generation modes.
void SetScalarModeToZ(void)
Get/Set the mode used for the scalar data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetScalarModeToDistance(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToFunctionDefined(void)
Get/Set the mode used for the scalar data.
~vtkParametricFunctionSource() override
void SetScalarModeToNone(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToQuadrant(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToModulus(void)
Get/Set the mode used for the scalar data.
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:382
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_INT_MAX
Definition: vtkType.h:155