VTK  9.3.20240329
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
58 #ifndef vtkHedgeHog_h
59 #define vtkHedgeHog_h
60 
61 #include "vtkFiltersCoreModule.h" // For export macro
62 #include "vtkPolyDataAlgorithm.h"
63 
64 #define VTK_USE_VECTOR 0
65 #define VTK_USE_NORMAL 1
66 
67 VTK_ABI_NAMESPACE_BEGIN
68 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
69 {
70 public:
71  static vtkHedgeHog* New();
73  void PrintSelf(ostream& os, vtkIndent indent) override;
74 
76 
79  vtkSetMacro(ScaleFactor, double);
80  vtkGetMacro(ScaleFactor, double);
82 
84 
87  vtkSetMacro(VectorMode, int);
88  vtkGetMacro(VectorMode, int);
89  void SetVectorModeToUseVector() { this->SetVectorMode(VTK_USE_VECTOR); }
90  void SetVectorModeToUseNormal() { this->SetVectorMode(VTK_USE_NORMAL); }
91  const char* GetVectorModeAsString();
93 
95 
100  vtkSetMacro(OutputPointsPrecision, int);
101  vtkGetMacro(OutputPointsPrecision, int);
103 
104 protected:
106  ~vtkHedgeHog() override = default;
107 
110  double ScaleFactor;
111  int VectorMode; // Orient/scale via normal or via vector data
113 
114 private:
115  vtkHedgeHog(const vtkHedgeHog&) = delete;
116  void operator=(const vtkHedgeHog&) = delete;
117 };
118 
123 {
124  if (this->VectorMode == VTK_USE_VECTOR)
125  {
126  return "UseVector";
127  }
128  else if (this->VectorMode == VTK_USE_NORMAL)
129  {
130  return "UseNormal";
131  }
132  else
133  {
134  return "Unknown";
135  }
136 }
137 VTK_ABI_NAMESPACE_END
138 #endif
create oriented lines from vector data
Definition: vtkHedgeHog.h:69
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:89
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:90
double ScaleFactor
Definition: vtkHedgeHog.h:110
int OutputPointsPrecision
Definition: vtkHedgeHog.h:112
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:122
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:64
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:65