VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25 
26 #define VTK_USE_VECTOR 0
27 #define VTK_USE_NORMAL 1
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkHedgeHog : public vtkPolyDataAlgorithm
31 {
32 public:
33  static vtkHedgeHog* New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  vtkSetMacro(ScaleFactor, double);
42  vtkGetMacro(ScaleFactor, double);
44 
46 
49  vtkSetMacro(VectorMode, int);
50  vtkGetMacro(VectorMode, int);
51  void SetVectorModeToUseVector() { this->SetVectorMode(VTK_USE_VECTOR); }
52  void SetVectorModeToUseNormal() { this->SetVectorMode(VTK_USE_NORMAL); }
53  const char* GetVectorModeAsString();
55 
57 
62  vtkSetMacro(OutputPointsPrecision, int);
63  vtkGetMacro(OutputPointsPrecision, int);
65 
66 protected:
67  vtkHedgeHog();
68  ~vtkHedgeHog() override = default;
69 
72  double ScaleFactor;
73  int VectorMode; // Orient/scale via normal or via vector data
75 
76 private:
77  vtkHedgeHog(const vtkHedgeHog&) = delete;
78  void operator=(const vtkHedgeHog&) = delete;
79 };
80 
85 {
86  if (this->VectorMode == VTK_USE_VECTOR)
87  {
88  return "UseVector";
89  }
90  else if (this->VectorMode == VTK_USE_NORMAL)
91  {
92  return "UseNormal";
93  }
94  else
95  {
96  return "Unknown";
97  }
98 }
99 VTK_ABI_NAMESPACE_END
100 #endif
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:52
Store vtkAlgorithm input/output information.
create oriented lines from vector data
Definition: vtkHedgeHog.h:30
const char * GetVectorModeAsString()
Return the vector mode as a character string.
Definition: vtkHedgeHog.h:84
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:73
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:26
double ScaleFactor
Definition: vtkHedgeHog.h:72
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
int OutputPointsPrecision
Definition: vtkHedgeHog.h:74
void SetVectorModeToUseVector()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:51
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:27
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.