VTK  9.7.1
vtkArrowSource.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
22 #ifndef vtkArrowSource_h
23 #define vtkArrowSource_h
24 
25 #include "vtkFiltersSourcesModule.h" // For export macro
26 #include "vtkPolyDataAlgorithm.h"
27 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkArrowSource : public vtkPolyDataAlgorithm
31 {
32 public:
36  static vtkArrowSource* New();
37 
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkSetClampMacro(TipLength, double, 0.0, 1.0);
46  vtkGetMacro(TipLength, double);
47  vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
48  vtkGetMacro(TipRadius, double);
50 
52 
56  vtkSetClampMacro(TipResolution, int, 1, 128);
57  vtkGetMacro(TipResolution, int);
59 
61 
64  vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
65  vtkGetMacro(ShaftRadius, double);
67 
69 
72  vtkSetClampMacro(ShaftResolution, int, 3, 128);
73  vtkGetMacro(ShaftResolution, int);
75 
77 
82  vtkBooleanMacro(Invert, bool);
83  vtkSetMacro(Invert, bool);
84  vtkGetMacro(Invert, bool);
86 
87  enum class ArrowOrigins
88  {
89  Default = 0,
90  Center = 1
91  };
92 
94 
98  vtkSetEnumMacro(ArrowOrigin, ArrowOrigins);
99  vtkGetEnumMacro(ArrowOrigin, ArrowOrigins);
101 
102  void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
103  void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
104  std::string GetArrowOriginAsString() const;
105 
106 protected:
107  vtkArrowSource();
108  ~vtkArrowSource() override = default;
109 
112 
114  double TipLength;
115  double TipRadius;
116 
118  double ShaftRadius;
119  bool Invert;
121 
122 private:
123  vtkArrowSource(const vtkArrowSource&) = delete;
124  void operator=(const vtkArrowSource&) = delete;
125 };
126 
127 VTK_ABI_NAMESPACE_END
128 #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:28
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.
#define VTK_MARSHALAUTO
void SetArrowOriginToCenter()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.