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 =========================================================================*/
25 #ifndef vtkHedgeHog_h
26 #define vtkHedgeHog_h
27 
28 #include "vtkFiltersCoreModule.h" // For export macro
29 #include "vtkPolyDataAlgorithm.h"
30 
31 #define VTK_USE_VECTOR 0
32 #define VTK_USE_NORMAL 1
33 
34 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
35 {
36 public:
37  static vtkHedgeHog *New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkSetMacro(ScaleFactor,double);
46  vtkGetMacro(ScaleFactor,double);
48 
50 
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 
61 
66  vtkSetMacro(OutputPointsPrecision,int);
67  vtkGetMacro(OutputPointsPrecision,int);
69 
70 protected:
71  vtkHedgeHog();
72  ~vtkHedgeHog() override {}
73 
76  double ScaleFactor;
77  int VectorMode; // Orient/scale via normal or via vector data
79 
80 private:
81  vtkHedgeHog(const vtkHedgeHog&) = delete;
82  void operator=(const vtkHedgeHog&) = delete;
83 };
84 
86 
89 inline const char *vtkHedgeHog::GetVectorModeAsString(void)
90 {
91  if ( this->VectorMode == VTK_USE_VECTOR)
92  {
93  return "UseVector";
94  }
95  else if ( this->VectorMode == VTK_USE_NORMAL)
96  {
97  return "UseNormal";
98  }
99  else
100  {
101  return "Unknown";
102  }
103 }
104 #endif
105 
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:56
~vtkHedgeHog() override
Definition: vtkHedgeHog.h:72
Store vtkAlgorithm input/output information.
create oriented lines from vector data
Definition: vtkHedgeHog.h:34
const char * GetVectorModeAsString()
Return the vector mode as a character string.
Definition: vtkHedgeHog.h:89
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
int VectorMode
Definition: vtkHedgeHog.h:77
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:31
double ScaleFactor
Definition: vtkHedgeHog.h:76
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
int OutputPointsPrecision
Definition: vtkHedgeHog.h:78
void SetVectorModeToUseVector()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:55
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:32
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.