00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00049 #ifndef __vtkParametricFunctionSource_h
00050 #define __vtkParametricFunctionSource_h
00051
00052 #include "vtkPolyDataAlgorithm.h"
00053
00054 class vtkCellArray;
00055 class vtkParametricFunction;
00056
00057 class VTK_GRAPHICS_EXPORT vtkParametricFunctionSource : public vtkPolyDataAlgorithm
00058 {
00059 public:
00060 vtkTypeRevisionMacro(vtkParametricFunctionSource,vtkPolyDataAlgorithm);
00061 void PrintSelf(ostream& os, vtkIndent indent);
00062
00065 static vtkParametricFunctionSource *New();
00066
00068
00069 virtual void SetParametricFunction(vtkParametricFunction*);
00070 vtkGetObjectMacro(ParametricFunction,vtkParametricFunction);
00072
00074
00077 vtkSetMacro(UResolution,int);
00078 vtkGetMacro(UResolution,int);
00080
00082
00085 vtkSetMacro(VResolution,int);
00086 vtkGetMacro(VResolution,int);
00088
00090
00093 vtkSetMacro(WResolution,int);
00094 vtkGetMacro(WResolution,int);
00096
00098
00102 vtkBooleanMacro(GenerateTextureCoordinates,int);
00103 vtkSetMacro(GenerateTextureCoordinates,int);
00104 vtkGetMacro(GenerateTextureCoordinates,int);
00106
00107
00109
00126 enum SCALAR_MODE { SCALAR_NONE = 0,
00127 SCALAR_U, SCALAR_V,
00128 SCALAR_U0, SCALAR_V0, SCALAR_U0V0,
00129 SCALAR_MODULUS, SCALAR_PHASE, SCALAR_QUADRANT,
00130 SCALAR_X, SCALAR_Y, SCALAR_Z, SCALAR_DISTANCE,
00131 SCALAR_FUNCTION_DEFINED };
00132
00134
00136
00153 vtkSetClampMacro(ScalarMode, int, SCALAR_NONE, SCALAR_FUNCTION_DEFINED);
00154 vtkGetMacro(ScalarMode, int);
00155 void SetScalarModeToNone( void ) {this->SetScalarMode(SCALAR_NONE);}
00156 void SetScalarModeToU( void ) {this->SetScalarMode(SCALAR_U);}
00157 void SetScalarModeToV( void ) {this->SetScalarMode(SCALAR_V);}
00158 void SetScalarModeToU0( void ) {this->SetScalarMode(SCALAR_U0);}
00159 void SetScalarModeToV0( void ) {this->SetScalarMode(SCALAR_V0);}
00160 void SetScalarModeToU0V0( void ) {this->SetScalarMode(SCALAR_U0V0);}
00161 void SetScalarModeToModulus( void ) {this->SetScalarMode(SCALAR_MODULUS);}
00162 void SetScalarModeToPhase( void ) {this->SetScalarMode(SCALAR_PHASE);}
00163 void SetScalarModeToQuadrant( void ) {this->SetScalarMode(SCALAR_QUADRANT);}
00164 void SetScalarModeToX( void ) {this->SetScalarMode(SCALAR_X);}
00165 void SetScalarModeToY( void ) {this->SetScalarMode(SCALAR_Y);}
00166 void SetScalarModeToZ( void ) {this->SetScalarMode(SCALAR_Z);}
00167 void SetScalarModeToDistance( void ) {this->SetScalarMode(SCALAR_DISTANCE);}
00168 void SetScalarModeToFunctionDefined( void ) {this->SetScalarMode(SCALAR_FUNCTION_DEFINED);}
00170
00172 unsigned long GetMTime();
00173
00174 protected:
00175 vtkParametricFunctionSource();
00176 virtual ~vtkParametricFunctionSource();
00177
00178
00179 int RequestData(vtkInformation *info, vtkInformationVector **input,
00180 vtkInformationVector *output);
00181
00182
00183 vtkParametricFunction *ParametricFunction;
00184
00185 int UResolution;
00186 int VResolution;
00187 int WResolution;
00188 int GenerateTextureCoordinates;
00189 int ScalarMode;
00190
00191 private:
00192
00193 void Produce1DOutput(vtkInformationVector *output);
00194 void Produce2DOutput(vtkInformationVector *output);
00195
00203 void MakeTriangleStrips ( vtkCellArray * strips, int PtsU, int PtsV );
00204
00205 vtkParametricFunctionSource(const vtkParametricFunctionSource&);
00206 void operator=(const vtkParametricFunctionSource&);
00207
00208 };
00209
00210 #endif