VTK  9.1.0
vtkArrowSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkArrowSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
137#ifndef vtkArrowSource_h
138#define vtkArrowSource_h
139
140#include "vtkFiltersSourcesModule.h" // For export macro
141#include "vtkPolyDataAlgorithm.h"
142
143class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
144{
145public:
150
152 void PrintSelf(ostream& os, vtkIndent indent) override;
153
155
158 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
159 vtkGetMacro(TipLength, double);
160 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
161 vtkGetMacro(TipRadius, double);
163
165
169 vtkSetClampMacro(TipResolution, int, 1, 128);
170 vtkGetMacro(TipResolution, int);
172
174
177 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
178 vtkGetMacro(ShaftRadius, double);
180
182
185 vtkSetClampMacro(ShaftResolution, int, 3, 128);
186 vtkGetMacro(ShaftResolution, int);
188
190
195 vtkBooleanMacro(Invert, bool);
196 vtkSetMacro(Invert, bool);
197 vtkGetMacro(Invert, bool);
199
200 enum class ArrowOrigins
201 {
202 Default = 0,
203 Center = 1
204 };
205
207
214
215 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
216 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
217 std::string GetArrowOriginAsString() const;
218
219protected:
221 ~vtkArrowSource() override = default;
222
225
227 double TipLength;
228 double TipRadius;
229
232 bool Invert;
234
235private:
236 vtkArrowSource(const vtkArrowSource&) = delete;
237 void operator=(const vtkArrowSource&) = delete;
238};
239
240#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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.