VTK  9.3.0
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:
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
create oriented lines from vector data
Definition: vtkHedgeHog.h:30
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:50
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:51
double ScaleFactor
Definition: vtkHedgeHog.h:71
int OutputPointsPrecision
Definition: vtkHedgeHog.h:73
int VectorMode
Definition: vtkHedgeHog.h:72
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:83
a simple class to control print indentation
Definition: vtkIndent.h:29
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:25
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:26