VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGenericInterpolatedVelocityField.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00041 #ifndef __vtkGenericInterpolatedVelocityField_h 00042 #define __vtkGenericInterpolatedVelocityField_h 00043 00044 #include "vtkCommonDataModelModule.h" // For export macro 00045 #include "vtkFunctionSet.h" 00046 00047 class vtkGenericDataSet; 00048 class vtkGenericCellIterator; 00049 class vtkGenericAdaptorCell; 00050 00051 class vtkGenericInterpolatedVelocityFieldDataSetsType; 00052 00053 class VTKCOMMONDATAMODEL_EXPORT vtkGenericInterpolatedVelocityField : public vtkFunctionSet 00054 { 00055 public: 00056 vtkTypeMacro(vtkGenericInterpolatedVelocityField,vtkFunctionSet); 00057 virtual void PrintSelf(ostream& os, vtkIndent indent); 00058 00061 static vtkGenericInterpolatedVelocityField *New(); 00062 00065 virtual int FunctionValues(double* x, double* f); 00066 00071 virtual void AddDataSet(vtkGenericDataSet* dataset); 00072 00075 void ClearLastCell(); 00076 00078 vtkGenericAdaptorCell *GetLastCell(); 00079 00083 int GetLastLocalCoordinates(double pcoords[3]); 00084 00086 00087 vtkGetMacro(Caching, int); 00088 vtkSetMacro(Caching, int); 00089 vtkBooleanMacro(Caching, int); 00091 00093 00094 vtkGetMacro(CacheHit, int); 00095 vtkGetMacro(CacheMiss, int); 00097 00099 00102 vtkGetStringMacro(VectorsSelection); 00103 void SelectVectors(const char *fieldName) 00104 {this->SetVectorsSelection(fieldName);} 00106 00108 00112 vtkGetObjectMacro(LastDataSet, vtkGenericDataSet); 00114 00117 virtual void CopyParameters(vtkGenericInterpolatedVelocityField* from); 00118 00119 protected: 00120 vtkGenericInterpolatedVelocityField(); 00121 ~vtkGenericInterpolatedVelocityField(); 00122 00123 vtkGenericCellIterator *GenCell; // last cell 00124 00125 double LastPCoords[3]; // last local coordinates 00126 int CacheHit; 00127 int CacheMiss; 00128 int Caching; 00129 00130 vtkGenericDataSet* LastDataSet; 00131 00132 vtkSetStringMacro(VectorsSelection); 00133 char *VectorsSelection; 00134 00135 vtkGenericInterpolatedVelocityFieldDataSetsType* DataSets; 00136 00137 int FunctionValues(vtkGenericDataSet* ds, double* x, double* f); 00138 00139 static const double TOLERANCE_SCALE; 00140 00141 private: 00142 vtkGenericInterpolatedVelocityField(const vtkGenericInterpolatedVelocityField&); // Not implemented. 00143 void operator=(const vtkGenericInterpolatedVelocityField&); // Not implemented. 00144 }; 00145 00146 #endif