VTK  9.2.6
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 =========================================================================*/
40 #ifndef vtkHedgeHog_h
41 #define vtkHedgeHog_h
42 
43 #include "vtkFiltersCoreModule.h" // For export macro
44 #include "vtkPolyDataAlgorithm.h"
45 
46 #define VTK_USE_VECTOR 0
47 #define VTK_USE_NORMAL 1
48 
49 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
50 {
51 public:
52  static vtkHedgeHog* New();
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
60  vtkSetMacro(ScaleFactor, double);
61  vtkGetMacro(ScaleFactor, double);
63 
65 
68  vtkSetMacro(VectorMode, int);
69  vtkGetMacro(VectorMode, int);
70  void SetVectorModeToUseVector() { this->SetVectorMode(VTK_USE_VECTOR); }
71  void SetVectorModeToUseNormal() { this->SetVectorMode(VTK_USE_NORMAL); }
72  const char* GetVectorModeAsString();
74 
76 
81  vtkSetMacro(OutputPointsPrecision, int);
82  vtkGetMacro(OutputPointsPrecision, int);
84 
85 protected:
87  ~vtkHedgeHog() override = default;
88 
91  double ScaleFactor;
92  int VectorMode; // Orient/scale via normal or via vector data
94 
95 private:
96  vtkHedgeHog(const vtkHedgeHog&) = delete;
97  void operator=(const vtkHedgeHog&) = delete;
98 };
99 
104 {
105  if (this->VectorMode == VTK_USE_VECTOR)
106  {
107  return "UseVector";
108  }
109  else if (this->VectorMode == VTK_USE_NORMAL)
110  {
111  return "UseNormal";
112  }
113  else
114  {
115  return "Unknown";
116  }
117 }
118 #endif
create oriented lines from vector data
Definition: vtkHedgeHog.h:50
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:70
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:71
double ScaleFactor
Definition: vtkHedgeHog.h:91
int OutputPointsPrecision
Definition: vtkHedgeHog.h:93
int VectorMode
Definition: vtkHedgeHog.h:92
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:103
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:46
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:47