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 =========================================================================*/
49 #ifndef vtkParametricFunctionSource_h
50 #define vtkParametricFunctionSource_h
51 
52 #include "vtkFiltersSourcesModule.h" // For export macro
53 #include "vtkPolyDataAlgorithm.h"
54 
55 class vtkCellArray;
57 
59 {
60 public:
62  void PrintSelf(ostream& os, vtkIndent indent);
63 
67 
69 
70  virtual void SetParametricFunction(vtkParametricFunction*);
71  vtkGetObjectMacro(ParametricFunction,vtkParametricFunction);
73 
75 
78  vtkSetClampMacro(UResolution,int,2,VTK_INT_MAX);
79  vtkGetMacro(UResolution,int);
81 
83 
86  vtkSetClampMacro(VResolution,int,2,VTK_INT_MAX);
87  vtkGetMacro(VResolution,int);
89 
91 
94  vtkSetClampMacro(WResolution,int,2,VTK_INT_MAX);
95  vtkGetMacro(WResolution,int);
97 
99 
103  vtkBooleanMacro(GenerateTextureCoordinates,int);
104  vtkSetClampMacro(GenerateTextureCoordinates,int,0,1);
105  vtkGetMacro(GenerateTextureCoordinates,int);
107 
109 
112  vtkBooleanMacro(GenerateNormals,int);
113  vtkSetClampMacro(GenerateNormals,int,0,1);
114  vtkGetMacro(GenerateNormals,int);
116 
118 
136  enum SCALAR_MODE { SCALAR_NONE = 0,
137  SCALAR_U, SCALAR_V,
138  SCALAR_U0, SCALAR_V0, SCALAR_U0V0,
139  SCALAR_MODULUS, SCALAR_PHASE, SCALAR_QUADRANT,
140  SCALAR_X, SCALAR_Y, SCALAR_Z, SCALAR_DISTANCE,
141  SCALAR_FUNCTION_DEFINED };
143 
145 
147  vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
148  vtkGetMacro(ScalarMode, int);
149  void SetScalarModeToNone( void ) {this->SetScalarMode(SCALAR_NONE);}
150  void SetScalarModeToU( void ) {this->SetScalarMode(SCALAR_U);}
151  void SetScalarModeToV( void ) {this->SetScalarMode(SCALAR_V);}
152  void SetScalarModeToU0( void ) {this->SetScalarMode(SCALAR_U0);}
153  void SetScalarModeToV0( void ) {this->SetScalarMode(SCALAR_V0);}
154  void SetScalarModeToU0V0( void ) {this->SetScalarMode(SCALAR_U0V0);}
155  void SetScalarModeToModulus( void ) {this->SetScalarMode(SCALAR_MODULUS);}
156  void SetScalarModeToPhase( void ) {this->SetScalarMode(SCALAR_PHASE);}
157  void SetScalarModeToQuadrant( void ) {this->SetScalarMode(SCALAR_QUADRANT);}
158  void SetScalarModeToX( void ) {this->SetScalarMode(SCALAR_X);}
159  void SetScalarModeToY( void ) {this->SetScalarMode(SCALAR_Y);}
160  void SetScalarModeToZ( void ) {this->SetScalarMode(SCALAR_Z);}
161  void SetScalarModeToDistance( void ) {this->SetScalarMode(SCALAR_DISTANCE);}
163  {this->SetScalarMode(SCALAR_FUNCTION_DEFINED);}
165 
167  unsigned long GetMTime();
168 
170 
173  vtkSetMacro(OutputPointsPrecision,int);
174  vtkGetMacro(OutputPointsPrecision,int);
176 
177 protected:
179  virtual ~vtkParametricFunctionSource();
180 
181  // Usual data generation method
183  vtkInformationVector *output);
184 
185  // Variables
187 
195 
196 private:
197  // Create output depending on function dimension
198  void Produce1DOutput(vtkInformationVector *output);
199  void Produce2DOutput(vtkInformationVector *output);
200 
208  void MakeTriangles ( vtkCellArray * strips, int PtsU, int PtsV );
209 
210  vtkParametricFunctionSource(const vtkParametricFunctionSource&); // Not implemented.
211  void operator=(const vtkParametricFunctionSource&); // Not implemented.
212 
213 };
214 
215 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_INT_MAX
Definition: vtkType.h:132
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
abstract interface for parametric functions
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSSOURCES_EXPORT
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
vtkParametricFunction * ParametricFunction
tessellate parametric functions