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 =========================================================================*/
31 #ifndef vtkHedgeHog_h
32 #define vtkHedgeHog_h
33 
34 #include "vtkFiltersCoreModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 
37 #define VTK_USE_VECTOR 0
38 #define VTK_USE_NORMAL 1
39 
40 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
41 {
42 public:
43  static vtkHedgeHog *New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
51  vtkSetMacro(ScaleFactor,double);
52  vtkGetMacro(ScaleFactor,double);
54 
56 
59  vtkSetMacro(VectorMode,int);
60  vtkGetMacro(VectorMode,int);
61  void SetVectorModeToUseVector() {this->SetVectorMode(VTK_USE_VECTOR);};
62  void SetVectorModeToUseNormal() {this->SetVectorMode(VTK_USE_NORMAL);};
63  const char *GetVectorModeAsString();
65 
67 
72  vtkSetMacro(OutputPointsPrecision,int);
73  vtkGetMacro(OutputPointsPrecision,int);
75 
76 protected:
77  vtkHedgeHog();
78  ~vtkHedgeHog() override {}
79 
82  double ScaleFactor;
83  int VectorMode; // Orient/scale via normal or via vector data
85 
86 private:
87  vtkHedgeHog(const vtkHedgeHog&) = delete;
88  void operator=(const vtkHedgeHog&) = delete;
89 };
90 
92 
95 inline const char *vtkHedgeHog::GetVectorModeAsString(void)
96 {
97  if ( this->VectorMode == VTK_USE_VECTOR)
98  {
99  return "UseVector";
100  }
101  else if ( this->VectorMode == VTK_USE_NORMAL)
102  {
103  return "UseNormal";
104  }
105  else
106  {
107  return "Unknown";
108  }
109 }
110 #endif
111 
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:62
~vtkHedgeHog() override
Definition: vtkHedgeHog.h:78
Store vtkAlgorithm input/output information.
create oriented lines from vector data
Definition: vtkHedgeHog.h:40
const char * GetVectorModeAsString()
Return the vector mode as a character string.
Definition: vtkHedgeHog.h:95
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:39
int VectorMode
Definition: vtkHedgeHog.h:83
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:37
double ScaleFactor
Definition: vtkHedgeHog.h:82
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:84
void SetVectorModeToUseVector()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:61
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:38
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.