VTK  9.2.6
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=========================================================================*/
31#ifndef vtkArrowSource_h
32#define vtkArrowSource_h
33
34#include "vtkFiltersSourcesModule.h" // For export macro
36
37class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
38{
39public:
44
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
52 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
53 vtkGetMacro(TipLength, double);
54 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
55 vtkGetMacro(TipRadius, double);
57
59
63 vtkSetClampMacro(TipResolution, int, 1, 128);
64 vtkGetMacro(TipResolution, int);
66
68
71 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
72 vtkGetMacro(ShaftRadius, double);
74
76
79 vtkSetClampMacro(ShaftResolution, int, 3, 128);
80 vtkGetMacro(ShaftResolution, int);
82
84
89 vtkBooleanMacro(Invert, bool);
90 vtkSetMacro(Invert, bool);
91 vtkGetMacro(Invert, bool);
93
94 enum class ArrowOrigins
95 {
96 Default = 0,
97 Center = 1
98 };
99
101
108
109 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
110 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
111 std::string GetArrowOriginAsString() const;
112
113protected:
115 ~vtkArrowSource() override = default;
116
119
121 double TipLength;
122 double TipRadius;
123
126 bool Invert;
128
129private:
130 vtkArrowSource(const vtkArrowSource&) = delete;
131 void operator=(const vtkArrowSource&) = delete;
132};
133
134#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:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.