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=========================================================================*/
28#ifndef vtkArrowSource_h
29#define vtkArrowSource_h
30
31#include "vtkFiltersSourcesModule.h" // For export macro
33
34class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
35{
36public:
41
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
49 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
50 vtkGetMacro(TipLength, double);
51 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
52 vtkGetMacro(TipRadius, double);
54
56
60 vtkSetClampMacro(TipResolution, int, 1, 128);
61 vtkGetMacro(TipResolution, int);
63
65
68 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
69 vtkGetMacro(ShaftRadius, double);
71
73
76 vtkSetClampMacro(ShaftResolution, int, 3, 128);
77 vtkGetMacro(ShaftResolution, int);
79
81
86 vtkBooleanMacro(Invert, bool);
87 vtkSetMacro(Invert, bool);
88 vtkGetMacro(Invert, bool);
90
91 enum class ArrowOrigins
92 {
93 Default = 0,
94 Center = 1
95 };
96
98
105
106 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
107 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
108 std::string GetArrowOriginAsString() const;
109
110protected:
112 ~vtkArrowSource() override = default;
113
116
118 double TipLength;
119 double TipRadius;
120
123 bool Invert;
125
126private:
127 vtkArrowSource(const vtkArrowSource&) = delete;
128 void operator=(const vtkArrowSource&) = delete;
129};
130
131#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:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.