VTK  9.2.6
vtkArrowSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArrowSource.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 =========================================================================*/
31 #ifndef vtkArrowSource_h
32 #define vtkArrowSource_h
33 
34 #include "vtkFiltersSourcesModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 
37 class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
38 {
39 public:
43  static vtkArrowSource* New();
44 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkSetClampMacro(TipLength, double, 0.0, 1.0);
53  vtkGetMacro(TipLength, double);
54  vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
55  vtkGetMacro(TipRadius, double);
57 
59 
63  vtkSetClampMacro(TipResolution, int, 1, 128);
64  vtkGetMacro(TipResolution, int);
66 
68 
71  vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
72  vtkGetMacro(ShaftRadius, double);
74 
76 
79  vtkSetClampMacro(ShaftResolution, int, 3, 128);
80  vtkGetMacro(ShaftResolution, int);
82 
84 
89  vtkBooleanMacro(Invert, bool);
90  vtkSetMacro(Invert, bool);
91  vtkGetMacro(Invert, bool);
93 
94  enum class ArrowOrigins
95  {
96  Default = 0,
97  Center = 1
98  };
99 
101 
105  vtkSetEnumMacro(ArrowOrigin, ArrowOrigins);
106  vtkGetEnumMacro(ArrowOrigin, ArrowOrigins);
108 
109  void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
110  void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
111  std::string GetArrowOriginAsString() const;
112 
113 protected:
114  vtkArrowSource();
115  ~vtkArrowSource() override = default;
116 
119 
121  double TipLength;
122  double TipRadius;
123 
125  double ShaftRadius;
126  bool Invert;
128 
129 private:
130  vtkArrowSource(const vtkArrowSource&) = delete;
131  void operator=(const vtkArrowSource&) = delete;
132 };
133 
134 #endif
void SetArrowOriginToDefault()
Store vtkAlgorithm input/output information.
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:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Appends a cylinder to a cone to form an arrow.
ArrowOrigins ArrowOrigin
Store zero or more vtkInformation instances.
void SetArrowOriginToCenter()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.