VTK  9.2.20230327
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 =========================================================================*/
70 #ifndef vtkHedgeHog_h
71 #define vtkHedgeHog_h
72 
73 #include "vtkFiltersCoreModule.h" // For export macro
74 #include "vtkPolyDataAlgorithm.h"
75 
76 #define VTK_USE_VECTOR 0
77 #define VTK_USE_NORMAL 1
78 
79 VTK_ABI_NAMESPACE_BEGIN
80 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
81 {
82 public:
83  static vtkHedgeHog* New();
85  void PrintSelf(ostream& os, vtkIndent indent) override;
86 
88 
91  vtkSetMacro(ScaleFactor, double);
92  vtkGetMacro(ScaleFactor, double);
94 
96 
99  vtkSetMacro(VectorMode, int);
100  vtkGetMacro(VectorMode, int);
101  void SetVectorModeToUseVector() { this->SetVectorMode(VTK_USE_VECTOR); }
102  void SetVectorModeToUseNormal() { this->SetVectorMode(VTK_USE_NORMAL); }
103  const char* GetVectorModeAsString();
105 
107 
112  vtkSetMacro(OutputPointsPrecision, int);
113  vtkGetMacro(OutputPointsPrecision, int);
115 
116 protected:
118  ~vtkHedgeHog() override = default;
119 
122  double ScaleFactor;
123  int VectorMode; // Orient/scale via normal or via vector data
125 
126 private:
127  vtkHedgeHog(const vtkHedgeHog&) = delete;
128  void operator=(const vtkHedgeHog&) = delete;
129 };
130 
135 {
136  if (this->VectorMode == VTK_USE_VECTOR)
137  {
138  return "UseVector";
139  }
140  else if (this->VectorMode == VTK_USE_NORMAL)
141  {
142  return "UseNormal";
143  }
144  else
145  {
146  return "Unknown";
147  }
148 }
149 VTK_ABI_NAMESPACE_END
150 #endif
create oriented lines from vector data
Definition: vtkHedgeHog.h:81
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkHedgeHog() override=default
void SetVectorModeToUseVector()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:101
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:102
double ScaleFactor
Definition: vtkHedgeHog.h:122
int OutputPointsPrecision
Definition: vtkHedgeHog.h:124
static vtkHedgeHog * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
const char * GetVectorModeAsString()
Return the vector mode as a character string.
Definition: vtkHedgeHog.h:134
a simple class to control print indentation
Definition: vtkIndent.h:120
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:388
@ port
Definition: vtkX3D.h:459
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:76
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:77