VTK
vtkHedgeHog.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHedgeHog.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef __vtkHedgeHog_h
31 #define __vtkHedgeHog_h
32 
33 #include "vtkPolyDataAlgorithm.h"
34 
35 #define VTK_USE_VECTOR 0
36 #define VTK_USE_NORMAL 1
37 
39 {
40 public:
41  static vtkHedgeHog *New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
47  vtkSetMacro(ScaleFactor,double);
48  vtkGetMacro(ScaleFactor,double);
50 
52 
53  vtkSetMacro(VectorMode,int);
54  vtkGetMacro(VectorMode,int);
55  void SetVectorModeToUseVector() {this->SetVectorMode(VTK_USE_VECTOR);};
56  void SetVectorModeToUseNormal() {this->SetVectorMode(VTK_USE_NORMAL);};
57  const char *GetVectorModeAsString();
59 
60 protected:
61  vtkHedgeHog();
63 
66  double ScaleFactor;
67  int VectorMode; // Orient/scale via normal or via vector data
68 
69 private:
70  vtkHedgeHog(const vtkHedgeHog&); // Not implemented.
71  void operator=(const vtkHedgeHog&); // Not implemented.
72 };
73 
75 
76 inline const char *vtkHedgeHog::GetVectorModeAsString(void)
77 {
78  if ( this->VectorMode == VTK_USE_VECTOR)
79  {
80  return "UseVector";
81  }
82  else if ( this->VectorMode == VTK_USE_NORMAL)
83  {
84  return "UseNormal";
85  }
86  else
87  {
88  return "Unknown";
89  }
90 }
91 #endif
92