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 =========================================================================*/
40 #ifndef vtkArrowSource_h
41 #define vtkArrowSource_h
42 
43 #include "vtkFiltersSourcesModule.h" // For export macro
44 #include "vtkPolyDataAlgorithm.h"
45 
46 class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
47 {
48 public:
52  static vtkArrowSource* New();
53 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
61  vtkSetClampMacro(TipLength, double, 0.0, 1.0);
62  vtkGetMacro(TipLength, double);
63  vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
64  vtkGetMacro(TipRadius, double);
66 
68 
72  vtkSetClampMacro(TipResolution, int, 1, 128);
73  vtkGetMacro(TipResolution, int);
75 
77 
80  vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
81  vtkGetMacro(ShaftRadius, double);
83 
85 
88  vtkSetClampMacro(ShaftResolution, int, 3, 128);
89  vtkGetMacro(ShaftResolution, int);
91 
93 
98  vtkBooleanMacro(Invert, bool);
99  vtkSetMacro(Invert, bool);
100  vtkGetMacro(Invert, bool);
102 
103  enum class ArrowOrigins
104  {
105  Default = 0,
106  Center = 1
107  };
108 
110 
117 
118  void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
119  void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
121 
122 protected:
124  ~vtkArrowSource() override = default;
125 
128 
130  double TipLength;
131  double TipRadius;
132 
134  double ShaftRadius;
135  bool Invert;
137 
138 private:
139  vtkArrowSource(const vtkArrowSource&) = delete;
140  void operator=(const vtkArrowSource&) = delete;
141 };
142 
143 #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:49
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