VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  vtkSetMacro(UResolution,int);
79  vtkGetMacro(UResolution,int);
81 
83 
86  vtkSetMacro(VResolution,int);
87  vtkGetMacro(VResolution,int);
89 
91 
94  vtkSetMacro(WResolution,int);
95  vtkGetMacro(WResolution,int);
97 
99 
103  vtkBooleanMacro(GenerateTextureCoordinates,int);
104  vtkSetMacro(GenerateTextureCoordinates,int);
105  vtkGetMacro(GenerateTextureCoordinates,int);
107 
108  //BTX
110 
127  enum SCALAR_MODE { SCALAR_NONE = 0,
128  SCALAR_U, SCALAR_V,
129  SCALAR_U0, SCALAR_V0, SCALAR_U0V0,
130  SCALAR_MODULUS, SCALAR_PHASE, SCALAR_QUADRANT,
131  SCALAR_X, SCALAR_Y, SCALAR_Z, SCALAR_DISTANCE,
132  SCALAR_FUNCTION_DEFINED };
133  //ETX
135 
137 
154  vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
155  vtkGetMacro(ScalarMode, int);
156  void SetScalarModeToNone( void ) {this->SetScalarMode(SCALAR_NONE);}
157  void SetScalarModeToU( void ) {this->SetScalarMode(SCALAR_U);}
158  void SetScalarModeToV( void ) {this->SetScalarMode(SCALAR_V);}
159  void SetScalarModeToU0( void ) {this->SetScalarMode(SCALAR_U0);}
160  void SetScalarModeToV0( void ) {this->SetScalarMode(SCALAR_V0);}
161  void SetScalarModeToU0V0( void ) {this->SetScalarMode(SCALAR_U0V0);}
162  void SetScalarModeToModulus( void ) {this->SetScalarMode(SCALAR_MODULUS);}
163  void SetScalarModeToPhase( void ) {this->SetScalarMode(SCALAR_PHASE);}
164  void SetScalarModeToQuadrant( void ) {this->SetScalarMode(SCALAR_QUADRANT);}
165  void SetScalarModeToX( void ) {this->SetScalarMode(SCALAR_X);}
166  void SetScalarModeToY( void ) {this->SetScalarMode(SCALAR_Y);}
167  void SetScalarModeToZ( void ) {this->SetScalarMode(SCALAR_Z);}
168  void SetScalarModeToDistance( void ) {this->SetScalarMode(SCALAR_DISTANCE);}
169  void SetScalarModeToFunctionDefined( void ) {this->SetScalarMode(SCALAR_FUNCTION_DEFINED);}
171 
173  unsigned long GetMTime();
174 
176 
180  vtkSetMacro(OutputPointsPrecision,int);
181  vtkGetMacro(OutputPointsPrecision,int);
183 
184 protected:
186  virtual ~vtkParametricFunctionSource();
187 
188  // Usual data generation method
190  vtkInformationVector *output);
191 
192  // Variables
194 
201 
202 private:
203  // Create output depending on function dimension
204  void Produce1DOutput(vtkInformationVector *output);
205  void Produce2DOutput(vtkInformationVector *output);
206 
214  void MakeTriangleStrips ( vtkCellArray * strips, int PtsU, int PtsV );
215 
216  vtkParametricFunctionSource(const vtkParametricFunctionSource&); // Not implemented.
217  void operator=(const vtkParametricFunctionSource&); // Not implemented.
218 
219 };
220 
221 #endif
Store vtkAlgorithm input/output information.
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:133
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
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
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
vtkParametricFunction * ParametricFunction
tessellate parametric functions
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69