VTK  9.3.0
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
51 #ifndef vtkLineSource_h
52 #define vtkLineSource_h
53 
54 #include "vtkFiltersSourcesModule.h" // For export macro
55 #include "vtkPolyDataAlgorithm.h"
56 
57 #include <vector> // for std::vector
58 VTK_ABI_NAMESPACE_BEGIN
59 class vtkPoints;
60 
61 class VTKFILTERSSOURCES_EXPORT vtkLineSource : public vtkPolyDataAlgorithm
62 {
63 public:
64  static vtkLineSource* New();
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
69 
72  vtkSetVector3Macro(Point1, double);
73  vtkGetVectorMacro(Point1, double, 3);
74  void SetPoint1(float[3]);
76 
78 
81  vtkSetVector3Macro(Point2, double);
82  vtkGetVectorMacro(Point2, double, 3);
83  void SetPoint2(float[3]);
85 
87 
94  vtkSetMacro(UseRegularRefinement, bool);
95  vtkGetMacro(UseRegularRefinement, bool);
96  vtkBooleanMacro(UseRegularRefinement, bool);
98 
100 
104  vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
105  vtkGetMacro(Resolution, int);
107 
109 
119  void SetRefinementRatio(int index, double value);
123 
125 
128  virtual void SetPoints(vtkPoints*);
129  vtkGetObjectMacro(Points, vtkPoints);
131 
133 
138  vtkSetMacro(OutputPointsPrecision, int);
139  vtkGetMacro(OutputPointsPrecision, int);
141 
142 protected:
143  vtkLineSource(int res = 1);
144  ~vtkLineSource() override;
145 
148  double Point1[3];
149  double Point2[3];
153  std::vector<double> RefinementRatios;
154 
160 
161 private:
162  vtkLineSource(const vtkLineSource&) = delete;
163  void operator=(const vtkLineSource&) = delete;
164 };
165 
166 VTK_ABI_NAMESPACE_END
167 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create a line defined by two end points
Definition: vtkLineSource.h:62
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...
int OutputPointsPrecision
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
std::vector< double > RefinementRatios
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.
static vtkLineSource * New()
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.
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:38
Superclass for algorithms that produce only polydata as output.
@ value
Definition: vtkX3D.h:220
@ index
Definition: vtkX3D.h:246
#define VTK_INT_MAX
Definition: vtkType.h:144