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 "vtkPolyDataAlgorithm.h"
53 
54 class vtkCellArray;
56 
58 {
59 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
66 
68 
69  virtual void SetParametricFunction(vtkParametricFunction*);
70  vtkGetObjectMacro(ParametricFunction,vtkParametricFunction);
72 
74 
77  vtkSetMacro(UResolution,int);
78  vtkGetMacro(UResolution,int);
80 
82 
85  vtkSetMacro(VResolution,int);
86  vtkGetMacro(VResolution,int);
88 
90 
93  vtkSetMacro(WResolution,int);
94  vtkGetMacro(WResolution,int);
96 
98 
102  vtkBooleanMacro(GenerateTextureCoordinates,int);
103  vtkSetMacro(GenerateTextureCoordinates,int);
104  vtkGetMacro(GenerateTextureCoordinates,int);
106 
107  //BTX
109 
126  enum SCALAR_MODE { SCALAR_NONE = 0,
127  SCALAR_U, SCALAR_V,
128  SCALAR_U0, SCALAR_V0, SCALAR_U0V0,
129  SCALAR_MODULUS, SCALAR_PHASE, SCALAR_QUADRANT,
130  SCALAR_X, SCALAR_Y, SCALAR_Z, SCALAR_DISTANCE,
131  SCALAR_FUNCTION_DEFINED };
132  //ETX
134 
136 
153  vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
154  vtkGetMacro(ScalarMode, int);
155  void SetScalarModeToNone( void ) {this->SetScalarMode(SCALAR_NONE);}
156  void SetScalarModeToU( void ) {this->SetScalarMode(SCALAR_U);}
157  void SetScalarModeToV( void ) {this->SetScalarMode(SCALAR_V);}
158  void SetScalarModeToU0( void ) {this->SetScalarMode(SCALAR_U0);}
159  void SetScalarModeToV0( void ) {this->SetScalarMode(SCALAR_V0);}
160  void SetScalarModeToU0V0( void ) {this->SetScalarMode(SCALAR_U0V0);}
161  void SetScalarModeToModulus( void ) {this->SetScalarMode(SCALAR_MODULUS);}
162  void SetScalarModeToPhase( void ) {this->SetScalarMode(SCALAR_PHASE);}
163  void SetScalarModeToQuadrant( void ) {this->SetScalarMode(SCALAR_QUADRANT);}
164  void SetScalarModeToX( void ) {this->SetScalarMode(SCALAR_X);}
165  void SetScalarModeToY( void ) {this->SetScalarMode(SCALAR_Y);}
166  void SetScalarModeToZ( void ) {this->SetScalarMode(SCALAR_Z);}
167  void SetScalarModeToDistance( void ) {this->SetScalarMode(SCALAR_DISTANCE);}
168  void SetScalarModeToFunctionDefined( void ) {this->SetScalarMode(SCALAR_FUNCTION_DEFINED);}
170 
172  unsigned long GetMTime();
173 
174 protected:
176  virtual ~vtkParametricFunctionSource();
177 
178  // Usual data generation method
180  vtkInformationVector *output);
181 
182  // Variables
184 
190 
191 private:
192  // Create output depending on function dimension
193  void Produce1DOutput(vtkInformationVector *output);
194  void Produce2DOutput(vtkInformationVector *output);
195 
203  void MakeTriangleStrips ( vtkCellArray * strips, int PtsU, int PtsV );
204 
205  vtkParametricFunctionSource(const vtkParametricFunctionSource&); // Not implemented.
206  void operator=(const vtkParametricFunctionSource&); // Not implemented.
207 
208 };
209 
210 #endif
#define VTK_GRAPHICS_EXPORT
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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:37
object to represent cell connectivity
Definition: vtkCellArray.h:48
Store zero or more vtkInformation instances.
vtkParametricFunction * ParametricFunction
tessellate parametric functions