VTK  9.0.1
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:
71  vtkHedgeHog();
72  ~vtkHedgeHog() override {}
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 
86 
89 inline const char* vtkHedgeHog::GetVectorModeAsString(void)
90 {
91  if (this->VectorMode == VTK_USE_VECTOR)
92  {
93  return "UseVector";
94  }
95  else if (this->VectorMode == VTK_USE_NORMAL)
96  {
97  return "UseNormal";
98  }
99  else
100  {
101  return "Unknown";
102  }
103 }
104 #endif
105 
VTK_USE_NORMAL
#define VTK_USE_NORMAL
Definition: vtkHedgeHog.h:32
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkHedgeHog::SetVectorModeToUseNormal
void SetVectorModeToUseNormal()
Definition: vtkHedgeHog.h:56
vtkHedgeHog::GetVectorModeAsString
const char * GetVectorModeAsString()
Return the vector mode as a character string.
Definition: vtkHedgeHog.h:89
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_USE_VECTOR
#define VTK_USE_VECTOR
Definition: vtkHedgeHog.h:31
vtkPolyDataAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkHedgeHog::VectorMode
int VectorMode
Definition: vtkHedgeHog.h:77
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkHedgeHog
create oriented lines from vector data
Definition: vtkHedgeHog.h:34
vtkHedgeHog::ScaleFactor
double ScaleFactor
Definition: vtkHedgeHog.h:76
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkHedgeHog::SetVectorModeToUseVector
void SetVectorModeToUseVector()
Definition: vtkHedgeHog.h:55
vtkHedgeHog::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkHedgeHog.h:78
vtkHedgeHog::~vtkHedgeHog
~vtkHedgeHog() override
Definition: vtkHedgeHog.h:72
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41