00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkCellDerivatives.h,v $ 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 =========================================================================*/ 00058 #ifndef __vtkCellDerivatives_h 00059 #define __vtkCellDerivatives_h 00060 00061 #include "vtkDataSetToDataSetFilter.h" 00062 00063 #define VTK_VECTOR_MODE_PASS_VECTORS 0 00064 #define VTK_VECTOR_MODE_COMPUTE_GRADIENT 1 00065 #define VTK_VECTOR_MODE_COMPUTE_VORTICITY 2 00066 00067 #define VTK_TENSOR_MODE_PASS_TENSORS 0 00068 #define VTK_TENSOR_MODE_COMPUTE_GRADIENT 1 00069 #define VTK_TENSOR_MODE_COMPUTE_STRAIN 2 00070 00071 class VTK_GRAPHICS_EXPORT vtkCellDerivatives : public vtkDataSetToDataSetFilter 00072 { 00073 public: 00074 vtkTypeRevisionMacro(vtkCellDerivatives,vtkDataSetToDataSetFilter); 00075 void PrintSelf(ostream& os, vtkIndent indent); 00076 00078 static vtkCellDerivatives *New(); 00079 00081 00086 vtkSetMacro(VectorMode,int); 00087 vtkGetMacro(VectorMode,int); 00088 void SetVectorModeToPassVectors() 00089 {this->SetVectorMode(VTK_VECTOR_MODE_PASS_VECTORS);}; 00090 void SetVectorModeToComputeGradient() 00091 {this->SetVectorMode(VTK_VECTOR_MODE_COMPUTE_GRADIENT);}; 00092 void SetVectorModeToComputeVorticity() 00093 {this->SetVectorMode(VTK_VECTOR_MODE_COMPUTE_VORTICITY);}; 00094 const char *GetVectorModeAsString(); 00096 00098 00103 vtkSetMacro(TensorMode,int); 00104 vtkGetMacro(TensorMode,int); 00105 void SetTensorModeToPassTensors() 00106 {this->SetTensorMode(VTK_TENSOR_MODE_PASS_TENSORS);}; 00107 void SetTensorModeToComputeGradient() 00108 {this->SetTensorMode(VTK_TENSOR_MODE_COMPUTE_GRADIENT);}; 00109 void SetTensorModeToComputeStrain() 00110 {this->SetTensorMode(VTK_TENSOR_MODE_COMPUTE_STRAIN);}; 00111 const char *GetTensorModeAsString(); 00113 00114 protected: 00115 vtkCellDerivatives(); 00116 ~vtkCellDerivatives() {}; 00117 void Execute(); 00118 00119 int VectorMode; 00120 int TensorMode; 00121 private: 00122 vtkCellDerivatives(const vtkCellDerivatives&); // Not implemented. 00123 void operator=(const vtkCellDerivatives&); // Not implemented. 00124 }; 00125 00126 #endif 00127 00128