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
38#ifndef vtkParametricFunctionSource_h
39#define vtkParametricFunctionSource_h
40
41#include "vtkFiltersSourcesModule.h" // For export macro
43
44VTK_ABI_NAMESPACE_BEGIN
45class vtkCellArray;
47
48class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
49{
50public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
58
60
64 vtkGetObjectMacro(ParametricFunction, vtkParametricFunction);
66
68
73 vtkSetClampMacro(UResolution, int, 2, VTK_INT_MAX);
74 vtkGetMacro(UResolution, int);
76
78
83 vtkSetClampMacro(VResolution, int, 2, VTK_INT_MAX);
84 vtkGetMacro(VResolution, int);
86
88
93 vtkSetClampMacro(WResolution, int, 2, VTK_INT_MAX);
94 vtkGetMacro(WResolution, int);
96
98
105 vtkBooleanMacro(GenerateTextureCoordinates, vtkTypeBool);
106 vtkSetClampMacro(GenerateTextureCoordinates, vtkTypeBool, 0, 1);
107 vtkGetMacro(GenerateTextureCoordinates, vtkTypeBool);
109
111
117 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
118 vtkSetClampMacro(GenerateNormals, vtkTypeBool, 0, 1);
119 vtkGetMacro(GenerateNormals, vtkTypeBool);
121
150 {
151 SCALAR_NONE = 0,
164 SCALAR_FUNCTION_DEFINED
165 };
166
168
172 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
173 vtkGetMacro(ScalarMode, int);
174 void SetScalarModeToNone() { this->SetScalarMode(SCALAR_NONE); }
175 void SetScalarModeToU() { this->SetScalarMode(SCALAR_U); }
176 void SetScalarModeToV() { this->SetScalarMode(SCALAR_V); }
177 void SetScalarModeToU0() { this->SetScalarMode(SCALAR_U0); }
178 void SetScalarModeToV0() { this->SetScalarMode(SCALAR_V0); }
179 void SetScalarModeToU0V0() { this->SetScalarMode(SCALAR_U0V0); }
180 void SetScalarModeToModulus() { this->SetScalarMode(SCALAR_MODULUS); }
181 void SetScalarModeToPhase() { this->SetScalarMode(SCALAR_PHASE); }
182 void SetScalarModeToQuadrant() { this->SetScalarMode(SCALAR_QUADRANT); }
183 void SetScalarModeToX() { this->SetScalarMode(SCALAR_X); }
184 void SetScalarModeToY() { this->SetScalarMode(SCALAR_Y); }
185 void SetScalarModeToZ() { this->SetScalarMode(SCALAR_Z); }
186 void SetScalarModeToDistance() { this->SetScalarMode(SCALAR_DISTANCE); }
187 void SetScalarModeToFunctionDefined() { this->SetScalarMode(SCALAR_FUNCTION_DEFINED); }
189
194
196
201 vtkSetMacro(OutputPointsPrecision, int);
202 vtkGetMacro(OutputPointsPrecision, int);
204
205protected:
208
209 // Usual data generation method
211 vtkInformation* info, vtkInformationVector** input, vtkInformationVector* output) override;
212
213 // Variables
215
223
224private:
225 // Create output depending on function dimension
226 void Produce1DOutput(vtkInformationVector* output);
227 void Produce2DOutput(vtkInformationVector* output);
228
240 void MakeTriangles(vtkCellArray* strips, int PtsU, int PtsV);
241
243 void operator=(const vtkParametricFunctionSource&) = delete;
244};
245
246VTK_ABI_NAMESPACE_END
247#endif
object to represent cell connectivity
a simple class to control print indentation
Definition vtkIndent.h:29
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