VTK  9.3.0
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
28#ifndef vtkArrowSource_h
29#define vtkArrowSource_h
30
31#include "vtkFiltersSourcesModule.h" // For export macro
33
34VTK_ABI_NAMESPACE_BEGIN
35class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
36{
37public:
42
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
50 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
51 vtkGetMacro(TipLength, double);
52 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
53 vtkGetMacro(TipRadius, double);
55
57
61 vtkSetClampMacro(TipResolution, int, 1, 128);
62 vtkGetMacro(TipResolution, int);
64
66
69 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
70 vtkGetMacro(ShaftRadius, double);
72
74
77 vtkSetClampMacro(ShaftResolution, int, 3, 128);
78 vtkGetMacro(ShaftResolution, int);
80
82
87 vtkBooleanMacro(Invert, bool);
88 vtkSetMacro(Invert, bool);
89 vtkGetMacro(Invert, bool);
91
92 enum class ArrowOrigins
93 {
94 Default = 0,
95 Center = 1
96 };
97
99
106
107 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
108 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
109 std::string GetArrowOriginAsString() const;
110
111protected:
113 ~vtkArrowSource() override = default;
114
117
119 double TipLength;
120 double TipRadius;
121
124 bool Invert;
126
127private:
128 vtkArrowSource(const vtkArrowSource&) = delete;
129 void operator=(const vtkArrowSource&) = delete;
130};
131
132VTK_ABI_NAMESPACE_END
133#endif
Appends a cylinder to a cone to form an arrow.
ArrowOrigins ArrowOrigin
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGetEnumMacro(ArrowOrigin, ArrowOrigins)
Sets and Gets the location used for orienting and scaling the arrow.
std::string GetArrowOriginAsString() const
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetArrowOriginToCenter()
void SetArrowOriginToDefault()
static vtkArrowSource * New()
Construct cone with angle of 45 degrees.
vtkSetEnumMacro(ArrowOrigin, ArrowOrigins)
Sets and Gets the location used for orienting and scaling the arrow.
~vtkArrowSource() override=default
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.