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=========================================================================*/
56#ifndef vtkParametricFunctionSource_h
57#define vtkParametricFunctionSource_h
58
59#include "vtkFiltersSourcesModule.h" // For export macro
61
62class vtkCellArray;
64
65class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
66{
67public:
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
75
77
81 vtkGetObjectMacro(ParametricFunction, vtkParametricFunction);
83
85
90 vtkSetClampMacro(UResolution, int, 2, VTK_INT_MAX);
91 vtkGetMacro(UResolution, int);
93
95
100 vtkSetClampMacro(VResolution, int, 2, VTK_INT_MAX);
101 vtkGetMacro(VResolution, int);
103
105
110 vtkSetClampMacro(WResolution, int, 2, VTK_INT_MAX);
111 vtkGetMacro(WResolution, int);
113
115
122 vtkBooleanMacro(GenerateTextureCoordinates, vtkTypeBool);
123 vtkSetClampMacro(GenerateTextureCoordinates, vtkTypeBool, 0, 1);
124 vtkGetMacro(GenerateTextureCoordinates, vtkTypeBool);
126
128
134 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
135 vtkSetClampMacro(GenerateNormals, vtkTypeBool, 0, 1);
136 vtkGetMacro(GenerateNormals, vtkTypeBool);
138
167 {
168 SCALAR_NONE = 0,
181 SCALAR_FUNCTION_DEFINED
182 };
183
185
189 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
190 vtkGetMacro(ScalarMode, int);
191 void SetScalarModeToNone(void) { this->SetScalarMode(SCALAR_NONE); }
192 void SetScalarModeToU(void) { this->SetScalarMode(SCALAR_U); }
193 void SetScalarModeToV(void) { this->SetScalarMode(SCALAR_V); }
194 void SetScalarModeToU0(void) { this->SetScalarMode(SCALAR_U0); }
195 void SetScalarModeToV0(void) { this->SetScalarMode(SCALAR_V0); }
196 void SetScalarModeToU0V0(void) { this->SetScalarMode(SCALAR_U0V0); }
197 void SetScalarModeToModulus(void) { this->SetScalarMode(SCALAR_MODULUS); }
198 void SetScalarModeToPhase(void) { this->SetScalarMode(SCALAR_PHASE); }
199 void SetScalarModeToQuadrant(void) { this->SetScalarMode(SCALAR_QUADRANT); }
200 void SetScalarModeToX(void) { this->SetScalarMode(SCALAR_X); }
201 void SetScalarModeToY(void) { this->SetScalarMode(SCALAR_Y); }
202 void SetScalarModeToZ(void) { this->SetScalarMode(SCALAR_Z); }
203 void SetScalarModeToDistance(void) { this->SetScalarMode(SCALAR_DISTANCE); }
204 void SetScalarModeToFunctionDefined(void) { this->SetScalarMode(SCALAR_FUNCTION_DEFINED); }
206
211
213
218 vtkSetMacro(OutputPointsPrecision, int);
219 vtkGetMacro(OutputPointsPrecision, int);
221
222protected:
225
226 // Usual data generation method
229
230 // Variables
232
240
241private:
242 // Create output depending on function dimension
243 void Produce1DOutput(vtkInformationVector* output);
244 void Produce2DOutput(vtkInformationVector* output);
245
257 void MakeTriangles(vtkCellArray* strips, int PtsU, int PtsV);
258
260 void operator=(const vtkParametricFunctionSource&) = delete;
261};
262
263#endif
object to represent cell connectivity
Definition: vtkCellArray.h:190
a simple class to control print indentation
Definition: vtkIndent.h:43
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