VTK  9.0.2
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
32 #include "vtkPolyDataAlgorithm.h"
33 
34 class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
35 {
36 public:
40  static vtkArrowSource* New();
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 
78  vtkSetClampMacro(ShaftResolution, int, 0, 128);
79  vtkGetMacro(ShaftResolution, int);
81 
83 
88  vtkBooleanMacro(Invert, bool);
89  vtkSetMacro(Invert, bool);
90  vtkGetMacro(Invert, bool);
92 
93  enum class ArrowOrigins
94  {
95  Default = 0,
96  Center = 1
97  };
98 
100 
107 
108  void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
109  void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
111 
112 protected:
114  ~vtkArrowSource() override {}
115 
118 
120  double TipLength;
121  double TipRadius;
122 
124  double ShaftRadius;
125  bool Invert;
127 
128 private:
129  vtkArrowSource(const vtkArrowSource&) = delete;
130  void operator=(const vtkArrowSource&) = delete;
131 };
132 
133 #endif
Appends a cylinder to a cone to form an arrow.
ArrowOrigins ArrowOrigin
~vtkArrowSource() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGetEnumMacro(ArrowOrigin, ArrowOrigins)
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.
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.
@ string
Definition: vtkX3D.h:496