VTK  9.5.20250914
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
131#ifndef vtkArrowSource_h
132#define vtkArrowSource_h
133
134#include "vtkFiltersSourcesModule.h" // For export macro
135#include "vtkPolyDataAlgorithm.h"
136#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
137
138VTK_ABI_NAMESPACE_BEGIN
139class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkArrowSource : public vtkPolyDataAlgorithm
140{
141public:
146
148 void PrintSelf(ostream& os, vtkIndent indent) override;
149
151
154 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
155 vtkGetMacro(TipLength, double);
156 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
157 vtkGetMacro(TipRadius, double);
159
161
165 vtkSetClampMacro(TipResolution, int, 1, 128);
166 vtkGetMacro(TipResolution, int);
168
170
173 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
174 vtkGetMacro(ShaftRadius, double);
176
178
181 vtkSetClampMacro(ShaftResolution, int, 3, 128);
182 vtkGetMacro(ShaftResolution, int);
184
186
191 vtkBooleanMacro(Invert, bool);
192 vtkSetMacro(Invert, bool);
193 vtkGetMacro(Invert, bool);
195
196 enum class ArrowOrigins
197 {
198 Default = 0,
199 Center = 1
200 };
201
203
210
211 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
212 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
213 std::string GetArrowOriginAsString() const;
214
215protected:
217 ~vtkArrowSource() override = default;
218
221
223 double TipLength;
224 double TipRadius;
225
228 bool Invert;
230
231private:
232 vtkArrowSource(const vtkArrowSource&) = delete;
233 void operator=(const vtkArrowSource&) = delete;
234};
235
236VTK_ABI_NAMESPACE_END
237#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
#define VTK_MARSHALAUTO