VTK  9.1.0
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 =========================================================================*/
25 #ifndef vtkHedgeHog_h
26 #define vtkHedgeHog_h
27 
28 #include "vtkFiltersCoreModule.h" // For export macro
29 #include "vtkPolyDataAlgorithm.h"
30 
31 #define VTK_USE_VECTOR 0
32 #define VTK_USE_NORMAL 1
33 
34 class VTKFILTERSCORE_EXPORT vtkHedgeHog : public vtkPolyDataAlgorithm
35 {
36 public:
37  static vtkHedgeHog* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkSetMacro(ScaleFactor, double);
46  vtkGetMacro(ScaleFactor, double);
48 
50 
53  vtkSetMacro(VectorMode, int);
54  vtkGetMacro(VectorMode, int);
55  void SetVectorModeToUseVector() { this->SetVectorMode(VTK_USE_VECTOR); }
56  void SetVectorModeToUseNormal() { this->SetVectorMode(VTK_USE_NORMAL); }
57  const char* GetVectorModeAsString();
59 
61 
66  vtkSetMacro(OutputPointsPrecision, int);
67  vtkGetMacro(OutputPointsPrecision, int);
69 
70 protected:
72  ~vtkHedgeHog() override = default;
73 
76  double ScaleFactor;
77  int VectorMode; // Orient/scale via normal or via vector data
79 
80 private:
81  vtkHedgeHog(const vtkHedgeHog&) = delete;
82  void operator=(const vtkHedgeHog&) = delete;
83 };
84 
89 {
90  if (this->VectorMode == VTK_USE_VECTOR)
91  {
92  return "UseVector";
93  }
94  else if (this->VectorMode == VTK_USE_NORMAL)
95  {
96  return "UseNormal";
97  }
98  else
99  {
100  return "Unknown";
101  }
102 }
103 #endif
create oriented lines from vector data
Definition: vtkHedgeHog.h:35
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:55
void SetVectorModeToUseNormal()
Specify whether to use vector or normal to perform vector operations.
Definition: vtkHedgeHog.h:56
double ScaleFactor
Definition: vtkHedgeHog.h:76
int OutputPointsPrecision
Definition: vtkHedgeHog.h:78
int VectorMode
Definition: vtkHedgeHog.h:77
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:88
a simple class to control print indentation
Definition: vtkIndent.h:34
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:31
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:32