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=========================================================================*/
67#ifndef vtkAbstractInterpolatedVelocityField_h
68#define vtkAbstractInterpolatedVelocityField_h
69
70#include "vtkFunctionSet.h"
71
72#include <vector> // STL Header; Required for vector
73
74class vtkDataSet;
75
76class vtkDataArray;
77
78class vtkPointData;
79class vtkGenericCell;
80class vtkAbstractInterpolatedVelocityFieldDataSetsType;
81
82#include "vtkFiltersFlowPathsModule.h" // For export macro
83
84class VTKFILTERSFLOWPATHS_EXPORT vtkAbstractInterpolatedVelocityField : public vtkFunctionSet
85{
86public:
88 void PrintSelf( ostream & os, vtkIndent indent );
89
91
98 vtkSetMacro( Caching, bool );
99 vtkGetMacro( Caching, bool );
101
103
107 vtkGetMacro( CacheHit, int );
108 vtkGetMacro( CacheMiss, int );
110
111 vtkGetObjectMacro( LastDataSet, vtkDataSet );
112
114
117 vtkGetMacro( LastCellId, vtkIdType );
118 virtual void SetLastCellId( vtkIdType c ) { this->LastCellId = c; }
120
124 virtual void SetLastCellId( vtkIdType c, int dataindex ) = 0;
125
127
131 vtkGetStringMacro( VectorsSelection );
132 vtkGetMacro(VectorsType,int);
134
139 void SelectVectors(int fieldAssociation, const char * fieldName );
140
141
143
160 vtkSetMacro( NormalizeVector, bool );
161 vtkGetMacro( NormalizeVector, bool );
163
165
169 vtkSetMacro(ForceSurfaceTangentVector, bool);
170 vtkGetMacro(ForceSurfaceTangentVector, bool);
172
174
177 vtkSetMacro(SurfaceDataset, bool);
178 vtkGetMacro(SurfaceDataset, bool);
180
185 { this->Caching = from->Caching; }
186
187
191 virtual int FunctionValues( double * x, double * f ) = 0;
192
196 void ClearLastCellId() { this->LastCellId = -1; }
197
199
203 int GetLastWeights( double * w );
204 int GetLastLocalCoordinates( double pcoords[3] );
206
207protected:
210
211 static const double TOLERANCE_SCALE;
212 static const double SURFACE_TOLERANCE_SCALE;
213
223 double * Weights;
224 double LastPCoords[3];
229 vtkGenericCell * GenCell; // the current cell
230
231
233
236 vtkSetStringMacro( VectorsSelection );
238
250 virtual int FunctionValues( vtkDataSet * ds, double * x, double * f );
251
255 virtual bool CheckPCoords(double pcoords[3]);
256
264 virtual bool FindAndUpdateCell(vtkDataSet* ds, double* x);
265
268
274 void FastCompute( vtkDataArray * vectors, double f[3] );
275 bool InterpolatePoint( vtkPointData * outPD, vtkIdType outIndex );
277 { return ( this->LastCellId != -1 ) ? this->GenCell : NULL; }
279
280private:
282 ( const vtkAbstractInterpolatedVelocityField & ) VTK_DELETE_FUNCTION;
283 void operator = ( const vtkAbstractInterpolatedVelocityField & ) VTK_DELETE_FUNCTION;
284};
285
286
287
288#endif
An abstract class for obtaining the interpolated velocity values at a point.
virtual int FunctionValues(vtkDataSet *ds, double *x, double *f)
Evaluate the velocity field f at point (x, y, z) in a specified dataset by invoking vtkDataSet::FindC...
int GetLastWeights(double *w)
Get the interpolation weights cached from last evaluation.
int GetLastLocalCoordinates(double pcoords[3])
virtual int FunctionValues(double *x, double *f)=0
Evaluate the velocity field f at point (x, y, z).
virtual bool FindAndUpdateCell(vtkDataSet *ds, double *x)
Try to find the cell closest to provided x point in provided dataset, By first testing inclusion in i...
void ClearLastCellId()
Set the last cell id to -1 to incur a global cell search for the next point.
void FastCompute(vtkDataArray *vectors, double f[3])
If all weights have been computed (parametric coords etc all valid), a scalar/vector can be quickly i...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
bool InterpolatePoint(vtkPointData *outPD, vtkIdType outIndex)
virtual void CopyParameters(vtkAbstractInterpolatedVelocityField *from)
Import parameters.
virtual bool CheckPCoords(double pcoords[3])
Check that all three pcoords are between 0 and 1 included.
virtual void SetLastCellId(vtkIdType c, int dataindex)=0
Set the id of the most recently visited cell of a dataset.
void SelectVectors(int fieldAssociation, const char *fieldName)
the association type (see vtkDataObject::FieldAssociations) and the name of the velocity data field
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
Abstract interface for sets of functions.
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate point attribute data
Definition: vtkPointData.h:38
A helper class for interpolating between times during particle tracing.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287