VTK  9.3.1
vtkHedgeHog.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkHedgeHog_h
20 #define vtkHedgeHog_h
21 
22 #include "vtkFiltersCoreModule.h" // For export macro
23 #include "vtkPolyDataAlgorithm.h"
24 
25 #define VTK_USE_VECTOR 0
26 #define VTK_USE_NORMAL 1
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
30 {
31 public:
32  static vtkHedgeHog* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37 
40  vtkSetMacro(ScaleFactor, double);
41  vtkGetMacro(ScaleFactor, double);
43 
45 
48  vtkSetMacro(VectorMode, int);
49  vtkGetMacro(VectorMode, int);
50  void SetVectorModeToUseVector() { this->SetVectorMode(VTK_USE_VECTOR); }
51  void SetVectorModeToUseNormal() { this->SetVectorMode(VTK_USE_NORMAL); }
52  const char* GetVectorModeAsString();
54 
56 
61  vtkSetMacro(OutputPointsPrecision, int);
62  vtkGetMacro(OutputPointsPrecision, int);
64 
65 protected:
66  vtkHedgeHog();
67  ~vtkHedgeHog() override = default;
68 
71  double ScaleFactor;
72  int VectorMode; // Orient/scale via normal or via vector data
74 
75 private:
76  vtkHedgeHog(const vtkHedgeHog&) = delete;
77  void operator=(const vtkHedgeHog&) = delete;
78 };
79 
84 {
85  if (this->VectorMode == VTK_USE_VECTOR)
86  {
87  return "UseVector";
88  }
89  else if (this->VectorMode == VTK_USE_NORMAL)
90  {
91  return "UseNormal";
92  }
93  else
94  {
95  return "Unknown";
96  }
97 }
98 VTK_ABI_NAMESPACE_END
99 #endif
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:51
Store vtkAlgorithm input/output information.
create oriented lines from vector data
Definition: vtkHedgeHog.h:29
const char * GetVectorModeAsString()
Return the vector mode as a character string.
Definition: vtkHedgeHog.h:83
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:28
int VectorMode
Definition: vtkHedgeHog.h:72
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:25
double ScaleFactor
Definition: vtkHedgeHog.h:71
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:73
void SetVectorModeToUseVector()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:50
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:26
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.