VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkHedgeHog.h 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 =========================================================================*/ 00030 #ifndef __vtkHedgeHog_h 00031 #define __vtkHedgeHog_h 00032 00033 #include "vtkFiltersCoreModule.h" // For export macro 00034 #include "vtkPolyDataAlgorithm.h" 00035 00036 #define VTK_USE_VECTOR 0 00037 #define VTK_USE_NORMAL 1 00038 00039 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm 00040 { 00041 public: 00042 static vtkHedgeHog *New(); 00043 vtkTypeMacro(vtkHedgeHog,vtkPolyDataAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 vtkSetMacro(ScaleFactor,double); 00049 vtkGetMacro(ScaleFactor,double); 00051 00053 00054 vtkSetMacro(VectorMode,int); 00055 vtkGetMacro(VectorMode,int); 00056 void SetVectorModeToUseVector() {this->SetVectorMode(VTK_USE_VECTOR);}; 00057 void SetVectorModeToUseNormal() {this->SetVectorMode(VTK_USE_NORMAL);}; 00058 const char *GetVectorModeAsString(); 00060 00062 00065 vtkSetMacro(OutputPointsPrecision,int); 00066 vtkGetMacro(OutputPointsPrecision,int); 00068 00069 protected: 00070 vtkHedgeHog(); 00071 ~vtkHedgeHog() {} 00072 00073 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00074 virtual int FillInputPortInformation(int port, vtkInformation *info); 00075 double ScaleFactor; 00076 int VectorMode; // Orient/scale via normal or via vector data 00077 int OutputPointsPrecision; 00078 00079 private: 00080 vtkHedgeHog(const vtkHedgeHog&); // Not implemented. 00081 void operator=(const vtkHedgeHog&); // Not implemented. 00082 }; 00083 00085 00086 inline const char *vtkHedgeHog::GetVectorModeAsString(void) 00087 { 00088 if ( this->VectorMode == VTK_USE_VECTOR) 00089 { 00090 return "UseVector"; 00091 } 00092 else if ( this->VectorMode == VTK_USE_NORMAL) 00093 { 00094 return "UseNormal"; 00095 } 00096 else 00097 { 00098 return "Unknown"; 00099 } 00100 } 00101 #endif 00102