00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVectorNorm.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 =========================================================================*/ 00032 #ifndef __vtkVectorNorm_h 00033 #define __vtkVectorNorm_h 00034 00035 #define VTK_ATTRIBUTE_MODE_DEFAULT 0 00036 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1 00037 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2 00038 00039 #include "vtkDataSetAlgorithm.h" 00040 00041 class VTK_GRAPHICS_EXPORT vtkVectorNorm : public vtkDataSetAlgorithm 00042 { 00043 public: 00044 vtkTypeRevisionMacro(vtkVectorNorm,vtkDataSetAlgorithm); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 static vtkVectorNorm *New(); 00049 00051 00052 vtkSetMacro(Normalize,int); 00053 vtkGetMacro(Normalize,int); 00054 vtkBooleanMacro(Normalize,int); 00056 00058 00064 vtkSetMacro(AttributeMode,int); 00065 vtkGetMacro(AttributeMode,int); 00066 void SetAttributeModeToDefault() 00067 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_DEFAULT);}; 00068 void SetAttributeModeToUsePointData() 00069 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_POINT_DATA);}; 00070 void SetAttributeModeToUseCellData() 00071 {this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_CELL_DATA);}; 00072 const char *GetAttributeModeAsString(); 00074 00075 protected: 00076 vtkVectorNorm(); 00077 ~vtkVectorNorm() {}; 00078 00079 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00080 00081 int Normalize; // normalize 0<=n<=1 if true. 00082 int AttributeMode; //control whether to use point or cell data, or both 00083 private: 00084 vtkVectorNorm(const vtkVectorNorm&); // Not implemented. 00085 void operator=(const vtkVectorNorm&); // Not implemented. 00086 }; 00087 00088 #endif