VTK  9.2.6
vtkLineSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLineSource.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 =========================================================================*/
54 #ifndef vtkLineSource_h
55 #define vtkLineSource_h
56 
57 #include "vtkFiltersSourcesModule.h" // For export macro
58 #include "vtkPolyDataAlgorithm.h"
59 
60 #include <vector> // for std::vector
61 class vtkPoints;
62 
63 class VTKFILTERSSOURCES_EXPORT vtkLineSource : public vtkPolyDataAlgorithm
64 {
65 public:
66  static vtkLineSource* New();
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
74  vtkSetVector3Macro(Point1, double);
75  vtkGetVectorMacro(Point1, double, 3);
76  void SetPoint1(float[3]);
78 
80 
83  vtkSetVector3Macro(Point2, double);
84  vtkGetVectorMacro(Point2, double, 3);
85  void SetPoint2(float[3]);
87 
89 
96  vtkSetMacro(UseRegularRefinement, bool);
97  vtkGetMacro(UseRegularRefinement, bool);
98  vtkBooleanMacro(UseRegularRefinement, bool);
100 
102 
106  vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
107  vtkGetMacro(Resolution, int);
109 
111 
120  void SetNumberOfRefinementRatios(int);
121  void SetRefinementRatio(int index, double value);
122  int GetNumberOfRefinementRatios();
123  double GetRefinementRatio(int index);
125 
127 
130  virtual void SetPoints(vtkPoints*);
131  vtkGetObjectMacro(Points, vtkPoints);
133 
135 
140  vtkSetMacro(OutputPointsPrecision, int);
141  vtkGetMacro(OutputPointsPrecision, int);
143 
144 protected:
145  vtkLineSource(int res = 1);
146  ~vtkLineSource() override;
147 
150  double Point1[3];
151  double Point2[3];
155  std::vector<double> RefinementRatios;
156 
162 
163 private:
164  vtkLineSource(const vtkLineSource&) = delete;
165  void operator=(const vtkLineSource&) = delete;
166 };
167 
168 #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:155
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:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int OutputPointsPrecision
create a line defined by two end points
Definition: vtkLineSource.h:63
bool UseRegularRefinement
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:39
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.