00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkHedgeHog.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 =========================================================================*/ 00027 #ifndef __vtkHedgeHog_h 00028 #define __vtkHedgeHog_h 00029 00030 #include "vtkPolyDataAlgorithm.h" 00031 00032 #define VTK_USE_VECTOR 0 00033 #define VTK_USE_NORMAL 1 00034 00035 class VTK_GRAPHICS_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm 00036 { 00037 public: 00038 static vtkHedgeHog *New(); 00039 vtkTypeRevisionMacro(vtkHedgeHog,vtkPolyDataAlgorithm); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00043 00044 vtkSetMacro(ScaleFactor,double); 00045 vtkGetMacro(ScaleFactor,double); 00047 00049 00050 vtkSetMacro(VectorMode,int); 00051 vtkGetMacro(VectorMode,int); 00052 void SetVectorModeToUseVector() {this->SetVectorMode(VTK_USE_VECTOR);}; 00053 void SetVectorModeToUseNormal() {this->SetVectorMode(VTK_USE_NORMAL);}; 00054 const char *GetVectorModeAsString(); 00056 00057 protected: 00058 vtkHedgeHog(); 00059 ~vtkHedgeHog() {}; 00060 00061 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00062 virtual int FillInputPortInformation(int port, vtkInformation *info); 00063 double ScaleFactor; 00064 int VectorMode; // Orient/scale via normal or via vector data 00065 00066 private: 00067 vtkHedgeHog(const vtkHedgeHog&); // Not implemented. 00068 void operator=(const vtkHedgeHog&); // Not implemented. 00069 }; 00070 00072 inline const char *vtkHedgeHog::GetVectorModeAsString(void) 00073 { 00074 if ( this->VectorMode == VTK_USE_VECTOR) 00075 { 00076 return "UseVector"; 00077 } 00078 else if ( this->VectorMode == VTK_USE_NORMAL) 00079 { 00080 return "UseNormal"; 00081 } 00082 else 00083 { 00084 return "Unknown"; 00085 } 00086 } 00087 #endif