VTK  9.3.0
vtkParametricFunctionSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
47#ifndef vtkParametricFunctionSource_h
48#define vtkParametricFunctionSource_h
49
50#include "vtkFiltersSourcesModule.h" // For export macro
52
53VTK_ABI_NAMESPACE_BEGIN
54class vtkCellArray;
56
57class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
58{
59public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
67
69
73 vtkGetObjectMacro(ParametricFunction, vtkParametricFunction);
75
77
82 vtkSetClampMacro(UResolution, int, 2, VTK_INT_MAX);
83 vtkGetMacro(UResolution, int);
85
87
92 vtkSetClampMacro(VResolution, int, 2, VTK_INT_MAX);
93 vtkGetMacro(VResolution, int);
95
97
102 vtkSetClampMacro(WResolution, int, 2, VTK_INT_MAX);
103 vtkGetMacro(WResolution, int);
105
107
114 vtkBooleanMacro(GenerateTextureCoordinates, vtkTypeBool);
115 vtkSetClampMacro(GenerateTextureCoordinates, vtkTypeBool, 0, 1);
116 vtkGetMacro(GenerateTextureCoordinates, vtkTypeBool);
118
120
126 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
127 vtkSetClampMacro(GenerateNormals, vtkTypeBool, 0, 1);
128 vtkGetMacro(GenerateNormals, vtkTypeBool);
130
159 {
160 SCALAR_NONE = 0,
173 SCALAR_FUNCTION_DEFINED
174 };
175
177
181 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
182 vtkGetMacro(ScalarMode, int);
183 void SetScalarModeToNone() { this->SetScalarMode(SCALAR_NONE); }
184 void SetScalarModeToU() { this->SetScalarMode(SCALAR_U); }
185 void SetScalarModeToV() { this->SetScalarMode(SCALAR_V); }
186 void SetScalarModeToU0() { this->SetScalarMode(SCALAR_U0); }
187 void SetScalarModeToV0() { this->SetScalarMode(SCALAR_V0); }
188 void SetScalarModeToU0V0() { this->SetScalarMode(SCALAR_U0V0); }
189 void SetScalarModeToModulus() { this->SetScalarMode(SCALAR_MODULUS); }
190 void SetScalarModeToPhase() { this->SetScalarMode(SCALAR_PHASE); }
191 void SetScalarModeToQuadrant() { this->SetScalarMode(SCALAR_QUADRANT); }
192 void SetScalarModeToX() { this->SetScalarMode(SCALAR_X); }
193 void SetScalarModeToY() { this->SetScalarMode(SCALAR_Y); }
194 void SetScalarModeToZ() { this->SetScalarMode(SCALAR_Z); }
195 void SetScalarModeToDistance() { this->SetScalarMode(SCALAR_DISTANCE); }
196 void SetScalarModeToFunctionDefined() { this->SetScalarMode(SCALAR_FUNCTION_DEFINED); }
198
203
205
210 vtkSetMacro(OutputPointsPrecision, int);
211 vtkGetMacro(OutputPointsPrecision, int);
213
214protected:
217
218 // Usual data generation method
220 vtkInformation* info, vtkInformationVector** input, vtkInformationVector* output) override;
221
222 // Variables
224
232
233private:
234 // Create output depending on function dimension
235 void Produce1DOutput(vtkInformationVector* output);
236 void Produce2DOutput(vtkInformationVector* output);
237
249 void MakeTriangles(vtkCellArray* strips, int PtsU, int PtsV);
250
252 void operator=(const vtkParametricFunctionSource&) = delete;
253};
254
255VTK_ABI_NAMESPACE_END
256#endif
object to represent cell connectivity
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
tessellate parametric functions
void SetScalarModeToNone()
Get/Set the mode used for the scalar data.
void SetScalarModeToU0V0()
Get/Set the mode used for the scalar data.
void SetScalarModeToX()
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 SetScalarModeToV()
Get/Set the mode used for the scalar data.
void SetScalarModeToY()
Get/Set the mode used for the scalar data.
void SetScalarModeToQuadrant()
Get/Set the mode used for the scalar data.
vtkMTimeType GetMTime() override
Return the MTime also considering the parametric function.
void SetScalarModeToZ()
Get/Set the mode used for the scalar data.
SCALAR_MODE
Enumerate the supported scalar generation modes.
void SetScalarModeToU0()
Get/Set the mode used for the scalar data.
void SetScalarModeToU()
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.
~vtkParametricFunctionSource() override
void SetScalarModeToPhase()
Get/Set the mode used for the scalar data.
void SetScalarModeToDistance()
Get/Set the mode used for the scalar data.
void SetScalarModeToV0()
Get/Set the mode used for the scalar data.
void SetScalarModeToModulus()
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.
void SetScalarModeToFunctionDefined()
Get/Set the mode used for the scalar data.
abstract interface for parametric functions
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_INT_MAX
Definition vtkType.h:144