VTK  9.2.6
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=========================================================================*/
159#ifndef vtkParametricFunctionSource_h
160#define vtkParametricFunctionSource_h
161
162#include "vtkFiltersSourcesModule.h" // For export macro
163#include "vtkPolyDataAlgorithm.h"
164
165class vtkCellArray;
167
168class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
169{
170public:
172 void PrintSelf(ostream& os, vtkIndent indent) override;
173
178
180
184 vtkGetObjectMacro(ParametricFunction, vtkParametricFunction);
186
188
193 vtkSetClampMacro(UResolution, int, 2, VTK_INT_MAX);
194 vtkGetMacro(UResolution, int);
196
198
203 vtkSetClampMacro(VResolution, int, 2, VTK_INT_MAX);
204 vtkGetMacro(VResolution, int);
206
208
213 vtkSetClampMacro(WResolution, int, 2, VTK_INT_MAX);
214 vtkGetMacro(WResolution, int);
216
218
225 vtkBooleanMacro(GenerateTextureCoordinates, vtkTypeBool);
226 vtkSetClampMacro(GenerateTextureCoordinates, vtkTypeBool, 0, 1);
227 vtkGetMacro(GenerateTextureCoordinates, vtkTypeBool);
229
231
237 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
238 vtkSetClampMacro(GenerateNormals, vtkTypeBool, 0, 1);
239 vtkGetMacro(GenerateNormals, vtkTypeBool);
241
270 {
271 SCALAR_NONE = 0,
284 SCALAR_FUNCTION_DEFINED
285 };
286
288
292 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
293 vtkGetMacro(ScalarMode, int);
294 void SetScalarModeToNone(void) { this->SetScalarMode(SCALAR_NONE); }
295 void SetScalarModeToU(void) { this->SetScalarMode(SCALAR_U); }
296 void SetScalarModeToV(void) { this->SetScalarMode(SCALAR_V); }
297 void SetScalarModeToU0(void) { this->SetScalarMode(SCALAR_U0); }
298 void SetScalarModeToV0(void) { this->SetScalarMode(SCALAR_V0); }
299 void SetScalarModeToU0V0(void) { this->SetScalarMode(SCALAR_U0V0); }
300 void SetScalarModeToModulus(void) { this->SetScalarMode(SCALAR_MODULUS); }
301 void SetScalarModeToPhase(void) { this->SetScalarMode(SCALAR_PHASE); }
302 void SetScalarModeToQuadrant(void) { this->SetScalarMode(SCALAR_QUADRANT); }
303 void SetScalarModeToX(void) { this->SetScalarMode(SCALAR_X); }
304 void SetScalarModeToY(void) { this->SetScalarMode(SCALAR_Y); }
305 void SetScalarModeToZ(void) { this->SetScalarMode(SCALAR_Z); }
306 void SetScalarModeToDistance(void) { this->SetScalarMode(SCALAR_DISTANCE); }
307 void SetScalarModeToFunctionDefined(void) { this->SetScalarMode(SCALAR_FUNCTION_DEFINED); }
309
314
316
321 vtkSetMacro(OutputPointsPrecision, int);
322 vtkGetMacro(OutputPointsPrecision, int);
324
325protected:
328
329 // Usual data generation method
332
333 // Variables
335
343
344private:
345 // Create output depending on function dimension
346 void Produce1DOutput(vtkInformationVector* output);
347 void Produce2DOutput(vtkInformationVector* output);
348
360 void MakeTriangles(vtkCellArray* strips, int PtsU, int PtsV);
361
363 void operator=(const vtkParametricFunctionSource&) = delete;
364};
365
366#endif
object to represent cell connectivity
Definition: vtkCellArray.h:296
a simple class to control print indentation
Definition: vtkIndent.h:119
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