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 
155  { this->Caching = from->Caching; }
157 
158 
160  virtual int FunctionValues( double * x, double * f ) = 0;
161 
164  void ClearLastCellId() { this->LastCellId = -1; }
165 
167 
169  int GetLastWeights( double * w );
170  int GetLastLocalCoordinates( double pcoords[3] );
172 
173 protected:
176 
177  static const double TOLERANCE_SCALE;
178 
179  int CacheHit;
182  bool Caching;
186  double * Weights;
187  double LastPCoords[3];
191  vtkGenericCell * GenCell; // the current cell
192 
193 
195 
196  vtkSetStringMacro( VectorsSelection );
198 
207  virtual int FunctionValues( vtkDataSet * ds, double * x, double * f );
208 
209 //BTX
212 
216  void FastCompute( vtkDataArray * vectors, double f[3] );
217  bool InterpolatePoint( vtkPointData * outPD, vtkIdType outIndex );
219  { return ( this->LastCellId != -1 ) ? this->GenCell : NULL; }
220 //ETX
222 
223 private:
225  ( const vtkAbstractInterpolatedVelocityField & ); // Not implemented.
226  void operator = ( const vtkAbstractInterpolatedVelocityField & ); // Not implemented.
227 };
228 
229 
230 
231 #endif
#define VTKFILTERSFLOWPATHS_EXPORT
GLclampf f
Definition: vtkgl.h:14181
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:59
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
An abstract class for obtaining the interpolated velocity values at a point.
int vtkIdType
Definition: vtkType.h:281
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
virtual int FunctionValues(double *x, double *f)=0
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
provides thread-safe access to cells
virtual void CopyParameters(vtkAbstractInterpolatedVelocityField *from)
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
a simple class to control print indentation
Definition: vtkIndent.h:38
const GLubyte * c
Definition: vtkgl.h:15720
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
Abstract interface for sets of functions.
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:120
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
virtual void PrintSelf(ostream &os, vtkIndent indent)
bool InterpolatePoint(vtkPointData *outPD1, vtkPointData *outPD2, vtkIdType outIndex)
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69