VTK
vtkAbstractInterpolatedVelocityField.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractInterpolatedVelocityField.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 =========================================================================*/
66 #ifndef vtkAbstractInterpolatedVelocityField_h
67 #define vtkAbstractInterpolatedVelocityField_h
68 
69 #include "vtkFunctionSet.h"
70 //BTX
71 #include <vector> // STL Header; Required for vector
72 //ETX
73 
74 class vtkDataSet;
75 //BTX
76 class vtkDataArray;
77 //ETX
78 class vtkPointData;
79 class vtkGenericCell;
80 class vtkAbstractInterpolatedVelocityFieldDataSetsType;
81 
82 #include "vtkFiltersFlowPathsModule.h" // For export macro
83 
85 {
86 public:
88  void PrintSelf( ostream & os, vtkIndent indent );
89 
91 
97  vtkSetMacro( Caching, bool );
98  vtkGetMacro( Caching, bool );
100 
102 
104  vtkGetMacro( CacheHit, int );
105  vtkGetMacro( CacheMiss, int );
107 
108  vtkGetObjectMacro( LastDataSet, vtkDataSet );
109 
111 
112  vtkGetMacro( LastCellId, vtkIdType );
113  virtual void SetLastCellId( vtkIdType c ) { this->LastCellId = c; }
115 
117  virtual void SetLastCellId( vtkIdType c, int dataindex ) = 0;
118 
120 
122  vtkGetStringMacro( VectorsSelection );
123  vtkGetMacro(VectorsType,int);
125 
128  void SelectVectors(int fieldAssociation, const char * fieldName );
129 
130 
132 
148  vtkSetMacro( NormalizeVector, bool );
149  vtkGetMacro( NormalizeVector, bool );
151 
153 
156  vtkSetMacro(ForceSurfaceTangentVector, bool);
157  vtkGetMacro(ForceSurfaceTangentVector, bool);
159 
161 
163  vtkSetMacro(SurfaceDataset, bool);
164  vtkGetMacro(SurfaceDataset, bool);
166 
168 
170  { this->Caching = from->Caching; }
172 
173 
175  virtual int FunctionValues( double * x, double * f ) = 0;
176 
179  void ClearLastCellId() { this->LastCellId = -1; }
180 
182 
184  int GetLastWeights( double * w );
185  int GetLastLocalCoordinates( double pcoords[3] );
187 
188 protected:
191 
192  static const double TOLERANCE_SCALE;
193  static const double SURFACE_TOLERANCE_SCALE;
194 
195  int CacheHit;
198  bool Caching;
204  double * Weights;
205  double LastPCoords[3];
210  vtkGenericCell * GenCell; // the current cell
211 
212 
214 
215  vtkSetStringMacro( VectorsSelection );
217 
228  virtual int FunctionValues( vtkDataSet * ds, double * x, double * f );
229 
231  virtual bool CheckPCoords(double pcoords[3]);
232 
237  virtual bool FindAndUpdateCell(vtkDataSet* ds, double* x);
238 
239 //BTX
242 
246  void FastCompute( vtkDataArray * vectors, double f[3] );
247  bool InterpolatePoint( vtkPointData * outPD, vtkIdType outIndex );
249  { return ( this->LastCellId != -1 ) ? this->GenCell : NULL; }
250 //ETX
252 
253 private:
255  ( const vtkAbstractInterpolatedVelocityField & ); // Not implemented.
256  void operator = ( const vtkAbstractInterpolatedVelocityField & ); // Not implemented.
257 };
258 
259 
260 
261 #endif
#define VTKFILTERSFLOWPATHS_EXPORT
A helper class for interpolating between times during particle tracing.
represent and manipulate point attribute data
Definition: vtkPointData.h:36
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
An abstract class for obtaining the interpolated velocity values at a point.
int vtkIdType
Definition: vtkType.h:247
virtual int FunctionValues(double *x, double *f)=0
provides thread-safe access to cells
virtual void CopyParameters(vtkAbstractInterpolatedVelocityField *from)
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
Abstract interface for sets of functions.
virtual void PrintSelf(ostream &os, vtkIndent indent)
bool InterpolatePoint(vtkPointData *outPD1, vtkPointData *outPD2, vtkIdType outIndex)