VTK  9.3.20240928
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
137VTK_ABI_NAMESPACE_BEGIN
138class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
139{
140public:
145
147 void PrintSelf(ostream& os, vtkIndent indent) override;
148
150
153 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
154 vtkGetMacro(TipLength, double);
155 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
156 vtkGetMacro(TipRadius, double);
158
160
164 vtkSetClampMacro(TipResolution, int, 1, 128);
165 vtkGetMacro(TipResolution, int);
167
169
172 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
173 vtkGetMacro(ShaftRadius, double);
175
177
180 vtkSetClampMacro(ShaftResolution, int, 3, 128);
181 vtkGetMacro(ShaftResolution, int);
183
185
190 vtkBooleanMacro(Invert, bool);
191 vtkSetMacro(Invert, bool);
192 vtkGetMacro(Invert, bool);
194
195 enum class ArrowOrigins
196 {
197 Default = 0,
198 Center = 1
199 };
200
202
209
210 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
211 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
212 std::string GetArrowOriginAsString() const;
213
214protected:
216 ~vtkArrowSource() override = default;
217
220
222 double TipLength;
223 double TipRadius;
224
227 bool Invert;
229
230private:
231 vtkArrowSource(const vtkArrowSource&) = delete;
232 void operator=(const vtkArrowSource&) = delete;
233};
234
235VTK_ABI_NAMESPACE_END
236#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.