VTK  9.3.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
42 #ifndef vtkLineSource_h
43 #define vtkLineSource_h
44 
45 #include "vtkFiltersSourcesModule.h" // For export macro
46 #include "vtkPolyDataAlgorithm.h"
47 
48 #include <vector> // for std::vector
49 VTK_ABI_NAMESPACE_BEGIN
50 class vtkPoints;
51 
52 class VTKFILTERSSOURCES_EXPORT vtkLineSource : public vtkPolyDataAlgorithm
53 {
54 public:
55  static vtkLineSource* New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
63  vtkSetVector3Macro(Point1, double);
64  vtkGetVectorMacro(Point1, double, 3);
65  void SetPoint1(float[3]);
67 
69 
72  vtkSetVector3Macro(Point2, double);
73  vtkGetVectorMacro(Point2, double, 3);
74  void SetPoint2(float[3]);
76 
78 
85  vtkSetMacro(UseRegularRefinement, bool);
86  vtkGetMacro(UseRegularRefinement, bool);
87  vtkBooleanMacro(UseRegularRefinement, bool);
89 
91 
95  vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
96  vtkGetMacro(Resolution, int);
98 
100 
109  void SetNumberOfRefinementRatios(int);
110  void SetRefinementRatio(int index, double value);
111  int GetNumberOfRefinementRatios();
112  double GetRefinementRatio(int index);
114 
116 
119  virtual void SetPoints(vtkPoints*);
120  vtkGetObjectMacro(Points, vtkPoints);
122 
124 
129  vtkSetMacro(OutputPointsPrecision, int);
130  vtkGetMacro(OutputPointsPrecision, int);
132 
133 protected:
134  vtkLineSource(int res = 1);
135  ~vtkLineSource() override;
136 
139  double Point1[3];
140  double Point2[3];
144  std::vector<double> RefinementRatios;
145 
151 
152 private:
153  vtkLineSource(const vtkLineSource&) = delete;
154  void operator=(const vtkLineSource&) = delete;
155 };
156 
157 VTK_ABI_NAMESPACE_END
158 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:144
std::vector< double > RefinementRatios
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int OutputPointsPrecision
create a line defined by two end points
Definition: vtkLineSource.h:52
bool UseRegularRefinement
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:28
vtkPoints * Points
The list of points defining a broken line NB: The Point1/Point2 definition of a single line segment i...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.