VTK  9.3.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
19 #ifndef vtkArrowSource_h
20 #define vtkArrowSource_h
21 
22 #include "vtkFiltersSourcesModule.h" // For export macro
23 #include "vtkPolyDataAlgorithm.h"
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
27 {
28 public:
32  static vtkArrowSource* New();
33 
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  vtkSetClampMacro(TipLength, double, 0.0, 1.0);
42  vtkGetMacro(TipLength, double);
43  vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
44  vtkGetMacro(TipRadius, double);
46 
48 
52  vtkSetClampMacro(TipResolution, int, 1, 128);
53  vtkGetMacro(TipResolution, int);
55 
57 
60  vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
61  vtkGetMacro(ShaftRadius, double);
63 
65 
68  vtkSetClampMacro(ShaftResolution, int, 3, 128);
69  vtkGetMacro(ShaftResolution, int);
71 
73 
78  vtkBooleanMacro(Invert, bool);
79  vtkSetMacro(Invert, bool);
80  vtkGetMacro(Invert, bool);
82 
83  enum class ArrowOrigins
84  {
85  Default = 0,
86  Center = 1
87  };
88 
90 
94  vtkSetEnumMacro(ArrowOrigin, ArrowOrigins);
95  vtkGetEnumMacro(ArrowOrigin, ArrowOrigins);
97 
98  void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
99  void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
100  std::string GetArrowOriginAsString() const;
101 
102 protected:
103  vtkArrowSource();
104  ~vtkArrowSource() override = default;
105 
108 
110  double TipLength;
111  double TipRadius;
112 
114  double ShaftRadius;
115  bool Invert;
117 
118 private:
119  vtkArrowSource(const vtkArrowSource&) = delete;
120  void operator=(const vtkArrowSource&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #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.
void SetArrowOriginToCenter()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.