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 =========================================================================*/
63 #ifndef vtkLineSource_h
64 #define vtkLineSource_h
65 
66 #include "vtkFiltersSourcesModule.h" // For export macro
67 #include "vtkPolyDataAlgorithm.h"
68 
69 #include <vector> // for std::vector
70 class vtkPoints;
71 
72 class VTKFILTERSSOURCES_EXPORT vtkLineSource : public vtkPolyDataAlgorithm
73 {
74 public:
75  static vtkLineSource* New();
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
80 
83  vtkSetVector3Macro(Point1, double);
84  vtkGetVectorMacro(Point1, double, 3);
85  void SetPoint1(float[3]);
87 
89 
92  vtkSetVector3Macro(Point2, double);
93  vtkGetVectorMacro(Point2, double, 3);
94  void SetPoint2(float[3]);
96 
98 
105  vtkSetMacro(UseRegularRefinement, bool);
106  vtkGetMacro(UseRegularRefinement, bool);
107  vtkBooleanMacro(UseRegularRefinement, bool);
109 
111 
115  vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
116  vtkGetMacro(Resolution, int);
118 
120 
130  void SetRefinementRatio(int index, double value);
134 
136 
139  virtual void SetPoints(vtkPoints*);
140  vtkGetObjectMacro(Points, vtkPoints);
142 
144 
149  vtkSetMacro(OutputPointsPrecision, int);
150  vtkGetMacro(OutputPointsPrecision, int);
152 
153 protected:
154  vtkLineSource(int res = 1);
155  ~vtkLineSource() override;
156 
159  double Point1[3];
160  double Point2[3];
164  std::vector<double> RefinementRatios;
165 
171 
172 private:
173  vtkLineSource(const vtkLineSource&) = delete;
174  void operator=(const vtkLineSource&) = delete;
175 };
176 
177 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create a line defined by two end points
Definition: vtkLineSource.h:73
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:49
Superclass for algorithms that produce only polydata as output.
@ value
Definition: vtkX3D.h:226
@ index
Definition: vtkX3D.h:252
#define VTK_INT_MAX
Definition: vtkType.h:155