VTK  9.6.1
vtkLineSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
41
42#ifndef vtkLineSource_h
43#define vtkLineSource_h
44
45#include "vtkFiltersSourcesModule.h" // For export macro
47#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
48
49#include <vector> // for std::vector
50VTK_ABI_NAMESPACE_BEGIN
51class vtkPoints;
52
53class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkLineSource : public vtkPolyDataAlgorithm
54{
55public:
56 static vtkLineSource* New();
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
64 vtkSetVector3Macro(Point1, double);
65 vtkGetVectorMacro(Point1, double, 3);
66 void SetPoint1(float[3]);
68
70
73 vtkSetVector3Macro(Point2, double);
74 vtkGetVectorMacro(Point2, double, 3);
75 void SetPoint2(float[3]);
77
79
86 vtkSetMacro(UseRegularRefinement, bool);
87 vtkGetMacro(UseRegularRefinement, bool);
88 vtkBooleanMacro(UseRegularRefinement, bool);
90
92
96 vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
97 vtkGetMacro(Resolution, int);
99
101
111 void SetRefinementRatio(int index, double value);
113 double GetRefinementRatio(int index);
115
117
120 virtual void SetPoints(vtkPoints*);
121 vtkGetObjectMacro(Points, vtkPoints);
123
125
130 vtkSetMacro(OutputPointsPrecision, int);
131 vtkGetMacro(OutputPointsPrecision, int);
133
134protected:
135 vtkLineSource(int res = 1);
136 ~vtkLineSource() override;
137
140 double Point1[3];
141 double Point2[3];
145 std::vector<double> RefinementRatios;
146
152
153private:
154 vtkLineSource(const vtkLineSource&) = delete;
155 void operator=(const vtkLineSource&) = delete;
156};
157
158VTK_ABI_NAMESPACE_END
159#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void SetPoints(vtkPoints *)
Set/Get the list of points defining a broken line.
vtkPoints * Points
The list of points defining a broken line NB: The Point1/Point2 definition of a single line segment i...
double Point1[3]
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
std::vector< double > RefinementRatios
static vtkLineSource * New()
int GetNumberOfRefinementRatios()
API for setting/getting refinement ratios for points added to the line segment.
double GetRefinementRatio(int index)
API for setting/getting refinement ratios for points added to the line segment.
bool UseRegularRefinement
~vtkLineSource() override
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLineSource(int res=1)
void SetNumberOfRefinementRatios(int)
API for setting/getting refinement ratios for points added to the line segment.
double Point2[3]
void SetPoint2(float[3])
Set position of other end point.
void SetPoint1(float[3])
Set position of first end point.
void SetRefinementRatio(int index, double value)
API for setting/getting refinement ratios for points added to the line segment.
represent and manipulate 3D points
Definition vtkPoints.h:30
#define VTK_INT_MAX
Definition vtkType.h:197
#define VTK_MARSHALAUTO