VMTK
vtkvmtkStaticTemporalInterpolatedVelocityField.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkvmtkStaticTemporalInterpolatedVelocityField.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 =========================================================================*/
15 /*=========================================================================
16 
17 Program: VMTK
18 Language: C++
19 
20  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
21  See LICENSE file for details.
22 
23  Portions of this code are covered under the VTK copyright.
24  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
25  for details.
26 
27  This software is distributed WITHOUT ANY WARRANTY; without even
28  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29  PURPOSE. See the above copyright notices for more information.
30 
31 =========================================================================*/
36 #ifndef __vtkvmtkStaticTemporalInterpolatedVelocityField_h
37 #define __vtkvmtkStaticTemporalInterpolatedVelocityField_h
38 
39 #include "vtkvmtkWin32Header.h"
40 #include "vtkVersion.h"
41 
42 #if (VTK_MAJOR_VERSION <= 5)
43 #include "vtkAbstractInterpolatedVelocityField.h"
44 #else
45 #include "vtkInterpolatedVelocityField.h"
46 #endif
47 
48 class vtkTable;
49 #if (VTK_MAJOR_VERSION > 5)
50 class vtkAbstractInterpolatedVelocityFieldDataSetsType;
51 #endif
52 
54 #if (VTK_MAJOR_VERSION <= 5)
55  : public vtkAbstractInterpolatedVelocityField
56 #else
57  : public vtkInterpolatedVelocityField
58 #endif
59 {
60 public:
61 #if (VTK_MAJOR_VERSION <= 5)
63  vtkAbstractInterpolatedVelocityField );
64 #else
66  vtkInterpolatedVelocityField );
67 
68 #endif
69  void PrintSelf( ostream & os, vtkIndent indent ) VTK_OVERRIDE;
70 
74 
75 #if (VTK_MAJOR_VERSION <= 5)
76 
80  virtual void AddDataSet( vtkDataSet * dataset );
81 #endif
82 
83  vtkGetObjectMacro(TimeStepsTable,vtkTable);
84  virtual void SetTimeStepsTable(vtkTable*);
85 
86  vtkSetMacro(Periodic, int);
87  vtkGetMacro(Periodic, int);
88  vtkBooleanMacro(Periodic, int);
89 
90  vtkSetMacro(VelocityScale, double);
91  vtkGetMacro(VelocityScale, double);
92 
93  vtkSetMacro(UseVectorComponents, int);
94  vtkGetMacro(UseVectorComponents, int);
95  vtkBooleanMacro(UseVectorComponents, int);
96 
97  vtkSetStringMacro(VectorPrefix);
98  vtkGetStringMacro(VectorPrefix);
99 
100  vtkSetStringMacro(Component0Prefix);
101  vtkGetStringMacro(Component0Prefix);
102 
103  vtkSetStringMacro(Component1Prefix);
104  vtkGetStringMacro(Component1Prefix);
105 
106  vtkSetStringMacro(Component2Prefix);
107  vtkGetStringMacro(Component2Prefix);
108 
109 #if (VTK_MAJOR_VERSION <= 5)
110 
111  virtual int FunctionValues( double * x, double * f ) VTK_OVERRIDE;
112 #endif
113 
116  virtual void SetLastCellId( vtkIdType c, int dataindex ) VTK_OVERRIDE;
117 
119 
120  virtual void SetLastCellId( vtkIdType c ) VTK_OVERRIDE
121  { this->Superclass::SetLastCellId( c ); }
123 
124  virtual void CopyParameters( vtkAbstractInterpolatedVelocityField * from ) VTK_OVERRIDE;
125 
126 protected:
129 
136  virtual int FunctionValues( vtkDataSet * ds, double * x, double * f ) VTK_OVERRIDE;
137 
138  void FindTimeRowId(double time, int& prevRowId, int& nextRowId, double& p);
139 
140  void BuildArrayName(char* prefix, int index, char* name);
141 
142  vtkTable* TimeStepsTable;
143 
144  int Periodic;
145 
147 
149 
154 #if (VTK_MAJOR_VERSION > 5)
155  int LastDataSetIndex;
156 #endif
157 
158 private:
160  ( const vtkvmtkStaticTemporalInterpolatedVelocityField & ); // Not implemented.
161  void operator =
162  ( const vtkvmtkStaticTemporalInterpolatedVelocityField & ); // Not implemented.
163 };
164 
165 #endif
A concrete class for obtaining the interpolated velocity values at a point.