VTK
dox/Filters/Core/vtkHedgeHog.h
Go to the documentation of this file.
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 
00061 protected:
00062   vtkHedgeHog();
00063   ~vtkHedgeHog() {};
00064 
00065   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00066   virtual int FillInputPortInformation(int port, vtkInformation *info);
00067   double ScaleFactor;
00068   int VectorMode; // Orient/scale via normal or via vector data
00069 
00070 private:
00071   vtkHedgeHog(const vtkHedgeHog&);  // Not implemented.
00072   void operator=(const vtkHedgeHog&);  // Not implemented.
00073 };
00074 
00076 
00077 inline const char *vtkHedgeHog::GetVectorModeAsString(void)
00078 {
00079   if ( this->VectorMode == VTK_USE_VECTOR)
00080     {
00081     return "UseVector";
00082     }
00083   else if ( this->VectorMode == VTK_USE_NORMAL)
00084     {
00085     return "UseNormal";
00086     }
00087   else
00088     {
00089     return "Unknown";
00090     }
00091 }
00092 #endif
00093