VTK
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 =========================================================================*/
50 #ifndef vtkParametricFunctionSource_h
51 #define vtkParametricFunctionSource_h
52 
53 #include "vtkFiltersSourcesModule.h" // For export macro
54 #include "vtkPolyDataAlgorithm.h"
55 
56 class vtkCellArray;
58 
59 class VTKFILTERSSOURCES_EXPORT vtkParametricFunctionSource : public
61 {
62  public:
64  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
65 
70 
72 
75  virtual void SetParametricFunction(vtkParametricFunction*);
76  vtkGetObjectMacro(ParametricFunction, vtkParametricFunction);
78 
80 
85  vtkSetClampMacro(UResolution, int, 2, VTK_INT_MAX);
86  vtkGetMacro(UResolution, int);
88 
90 
95  vtkSetClampMacro(VResolution, int, 2, VTK_INT_MAX);
96  vtkGetMacro(VResolution, int);
98 
100 
105  vtkSetClampMacro(WResolution, int, 2, VTK_INT_MAX);
106  vtkGetMacro(WResolution, int);
108 
110 
117  vtkBooleanMacro(GenerateTextureCoordinates, int);
118  vtkSetClampMacro(GenerateTextureCoordinates, int, 0, 1);
119  vtkGetMacro(GenerateTextureCoordinates, int);
121 
123 
129  vtkBooleanMacro(GenerateNormals, int);
130  vtkSetClampMacro(GenerateNormals, int, 0, 1);
131  vtkGetMacro(GenerateNormals, int);
133 
161  enum SCALAR_MODE { SCALAR_NONE = 0,
162  SCALAR_U, SCALAR_V,
163  SCALAR_U0, SCALAR_V0, SCALAR_U0V0,
164  SCALAR_MODULUS, SCALAR_PHASE, SCALAR_QUADRANT,
165  SCALAR_X, SCALAR_Y, SCALAR_Z, SCALAR_DISTANCE,
166  SCALAR_FUNCTION_DEFINED
167  };
168 
170 
174  vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
175  vtkGetMacro(ScalarMode, int);
176  void SetScalarModeToNone(void) {this->SetScalarMode(SCALAR_NONE);}
177  void SetScalarModeToU(void) {this->SetScalarMode(SCALAR_U);}
178  void SetScalarModeToV(void) {this->SetScalarMode(SCALAR_V);}
179  void SetScalarModeToU0(void) {this->SetScalarMode(SCALAR_U0);}
180  void SetScalarModeToV0(void) {this->SetScalarMode(SCALAR_V0);}
181  void SetScalarModeToU0V0(void) {this->SetScalarMode(SCALAR_U0V0);}
182  void SetScalarModeToModulus(void) {this->SetScalarMode(SCALAR_MODULUS);}
183  void SetScalarModeToPhase(void) {this->SetScalarMode(SCALAR_PHASE);}
184  void SetScalarModeToQuadrant(void) {this->SetScalarMode(SCALAR_QUADRANT);}
185  void SetScalarModeToX(void) {this->SetScalarMode(SCALAR_X);}
186  void SetScalarModeToY(void) {this->SetScalarMode(SCALAR_Y);}
187  void SetScalarModeToZ(void) {this->SetScalarMode(SCALAR_Z);}
188  void SetScalarModeToDistance(void) {this->SetScalarMode(SCALAR_DISTANCE);}
190  {this->SetScalarMode(SCALAR_FUNCTION_DEFINED);}
192 
196  vtkMTimeType GetMTime() VTK_OVERRIDE;
197 
199 
204  vtkSetMacro(OutputPointsPrecision, int);
205  vtkGetMacro(OutputPointsPrecision, int);
207 
208  protected:
210  ~vtkParametricFunctionSource() VTK_OVERRIDE;
211 
212  // Usual data generation method
214  vtkInformationVector *output) VTK_OVERRIDE;
215 
216  // Variables
218 
226 
227  private:
228  // Create output depending on function dimension
229  void Produce1DOutput(vtkInformationVector *output);
230  void Produce2DOutput(vtkInformationVector *output);
231 
243  void MakeTriangles(vtkCellArray * strips, int PtsU, int PtsV);
244 
245  vtkParametricFunctionSource(const vtkParametricFunctionSource&) VTK_DELETE_FUNCTION;
246  void operator=(const vtkParametricFunctionSource&) VTK_DELETE_FUNCTION;
247 
248 };
249 
250 #endif
void SetScalarModeToNone(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToY(void)
Get/Set the mode used for the scalar data.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
void SetScalarModeToV0(void)
Get/Set the mode used for the scalar data.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:157
void SetScalarModeToU(void)
Get/Set the mode used for the scalar data.
SCALAR_MODE
Enumerate the supported scalar generation modes.
void SetScalarModeToDistance(void)
Get/Set the mode used for the scalar data.
static vtkPolyDataAlgorithm * New()
abstract interface for parametric functions
void SetScalarModeToPhase(void)
Get/Set the mode used for the scalar data.
Superclass for algorithms that produce only polydata as output.
void SetScalarModeToModulus(void)
Get/Set the mode used for the scalar data.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetScalarModeToX(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToU0(void)
Get/Set the mode used for the scalar data.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetScalarModeToZ(void)
Get/Set the mode used for the scalar data.
void SetScalarModeToQuadrant(void)
Get/Set the mode used for the scalar data.
object to represent cell connectivity
Definition: vtkCellArray.h:50
void SetScalarModeToU0V0(void)
Get/Set the mode used for the scalar data.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetScalarModeToFunctionDefined(void)
Get/Set the mode used for the scalar data.
vtkParametricFunction * ParametricFunction
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
tessellate parametric functions
void SetScalarModeToV(void)
Get/Set the mode used for the scalar data.