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=========================================================================*/
140#ifndef vtkArrowSource_h
141#define vtkArrowSource_h
142
143#include "vtkFiltersSourcesModule.h" // For export macro
144#include "vtkPolyDataAlgorithm.h"
145
146class VTKFILTERSSOURCES_EXPORT vtkArrowSource : public vtkPolyDataAlgorithm
147{
148public:
153
155 void PrintSelf(ostream& os, vtkIndent indent) override;
156
158
161 vtkSetClampMacro(TipLength, double, 0.0, 1.0);
162 vtkGetMacro(TipLength, double);
163 vtkSetClampMacro(TipRadius, double, 0.0, 10.0);
164 vtkGetMacro(TipRadius, double);
166
168
172 vtkSetClampMacro(TipResolution, int, 1, 128);
173 vtkGetMacro(TipResolution, int);
175
177
180 vtkSetClampMacro(ShaftRadius, double, 0.0, 5.0);
181 vtkGetMacro(ShaftRadius, double);
183
185
188 vtkSetClampMacro(ShaftResolution, int, 3, 128);
189 vtkGetMacro(ShaftResolution, int);
191
193
198 vtkBooleanMacro(Invert, bool);
199 vtkSetMacro(Invert, bool);
200 vtkGetMacro(Invert, bool);
202
203 enum class ArrowOrigins
204 {
205 Default = 0,
206 Center = 1
207 };
208
210
217
218 void SetArrowOriginToDefault() { this->SetArrowOrigin(ArrowOrigins::Default); }
219 void SetArrowOriginToCenter() { this->SetArrowOrigin(ArrowOrigins::Center); }
221
222protected:
224 ~vtkArrowSource() override = default;
225
228
230 double TipLength;
231 double TipRadius;
232
235 bool Invert;
237
238private:
239 vtkArrowSource(const vtkArrowSource&) = delete;
240 void operator=(const vtkArrowSource&) = delete;
241};
242
243#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:119
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