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=========================================================================*/
37#ifndef vtkArrowSource_h
38#define vtkArrowSource_h
39
40#include "vtkFiltersSourcesModule.h" // For export macro
42
43class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
44{
45public:
50
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
55
58 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
59 vtkGetMacro(TipLength, double);
60 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
61 vtkGetMacro(TipRadius, double);
63
65
69 vtkSetClampMacro(TipResolution, int, 1, 128);
70 vtkGetMacro(TipResolution, int);
72
74
77 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
78 vtkGetMacro(ShaftRadius, double);
80
82
85 vtkSetClampMacro(ShaftResolution, int, 3, 128);
86 vtkGetMacro(ShaftResolution, int);
88
90
95 vtkBooleanMacro(Invert, bool);
96 vtkSetMacro(Invert, bool);
97 vtkGetMacro(Invert, bool);
99
100 enum class ArrowOrigins
101 {
102 Default = 0,
103 Center = 1
104 };
105
107
114
115 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
116 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
118
119protected:
121 ~vtkArrowSource() override = default;
122
125
127 double TipLength;
128 double TipRadius;
129
132 bool Invert;
134
135private:
136 vtkArrowSource(const vtkArrowSource&) = delete;
137 void operator=(const vtkArrowSource&) = delete;
138};
139
140#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:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ string
Definition: vtkX3D.h:496