VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkFiltersCoreModule.h" // For export macro
34 #include "vtkPolyDataAlgorithm.h"
35 
36 #define VTK_USE_VECTOR 0
37 #define VTK_USE_NORMAL 1
38 
39 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
40 {
41 public:
42  static vtkHedgeHog *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  vtkSetMacro(ScaleFactor,double);
49  vtkGetMacro(ScaleFactor,double);
51 
53 
54  vtkSetMacro(VectorMode,int);
55  vtkGetMacro(VectorMode,int);
56  void SetVectorModeToUseVector() {this->SetVectorMode(VTK_USE_VECTOR);};
57  void SetVectorModeToUseNormal() {this->SetVectorMode(VTK_USE_NORMAL);};
58  const char *GetVectorModeAsString();
60 
61 protected:
62  vtkHedgeHog();
64 
65  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
66  virtual int FillInputPortInformation(int port, vtkInformation *info);
67  double ScaleFactor;
68  int VectorMode; // Orient/scale via normal or via vector data
69 
70 private:
71  vtkHedgeHog(const vtkHedgeHog&); // Not implemented.
72  void operator=(const vtkHedgeHog&); // Not implemented.
73 };
74 
76 
77 inline const char *vtkHedgeHog::GetVectorModeAsString(void)
78 {
79  if ( this->VectorMode == VTK_USE_VECTOR)
80  {
81  return "UseVector";
82  }
83  else if ( this->VectorMode == VTK_USE_NORMAL)
84  {
85  return "UseNormal";
86  }
87  else
88  {
89  return "Unknown";
90  }
91 }
92 #endif
93 
void SetVectorModeToUseNormal()
Definition: vtkHedgeHog.h:57
virtual int FillInputPortInformation(int port, vtkInformation *info)
create oriented lines from vector data
Definition: vtkHedgeHog.h:39
const char * GetVectorModeAsString()
Definition: vtkHedgeHog.h:77
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
int VectorMode
Definition: vtkHedgeHog.h:68
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:36
double ScaleFactor
Definition: vtkHedgeHog.h:67
void SetVectorModeToUseVector()
Definition: vtkHedgeHog.h:56
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:37