VTK
dox/Graphics/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 "vtkPolyDataAlgorithm.h"
00034 
00035 #define VTK_USE_VECTOR 0
00036 #define VTK_USE_NORMAL 1
00037 
00038 class VTK_GRAPHICS_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
00039 {
00040 public:
00041   static vtkHedgeHog *New();
00042   vtkTypeMacro(vtkHedgeHog,vtkPolyDataAlgorithm);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046 
00047   vtkSetMacro(ScaleFactor,double);
00048   vtkGetMacro(ScaleFactor,double);
00050 
00052 
00053   vtkSetMacro(VectorMode,int);
00054   vtkGetMacro(VectorMode,int);
00055   void SetVectorModeToUseVector() {this->SetVectorMode(VTK_USE_VECTOR);};
00056   void SetVectorModeToUseNormal() {this->SetVectorMode(VTK_USE_NORMAL);};
00057   const char *GetVectorModeAsString();
00059 
00060 protected:
00061   vtkHedgeHog();
00062   ~vtkHedgeHog() {};
00063 
00064   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00065   virtual int FillInputPortInformation(int port, vtkInformation *info);
00066   double ScaleFactor;
00067   int VectorMode; // Orient/scale via normal or via vector data
00068 
00069 private:
00070   vtkHedgeHog(const vtkHedgeHog&);  // Not implemented.
00071   void operator=(const vtkHedgeHog&);  // Not implemented.
00072 };
00073 
00075 
00076 inline const char *vtkHedgeHog::GetVectorModeAsString(void)
00077 {
00078   if ( this->VectorMode == VTK_USE_VECTOR) 
00079     {
00080     return "UseVector";
00081     }
00082   else if ( this->VectorMode == VTK_USE_NORMAL) 
00083     {
00084     return "UseNormal";
00085     }
00086   else 
00087     {
00088     return "Unknown";
00089     }
00090 }
00091 #endif
00092