VTK  9.0.20201201
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 =========================================================================*/
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 class vtkPoints;
59 
60 class VTKFILTERSSOURCES_EXPORT vtkLineSource : public vtkPolyDataAlgorithm
61 {
62 public:
63  static vtkLineSource* New();
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
68 
71  vtkSetVector3Macro(Point1, double);
72  vtkGetVectorMacro(Point1, double, 3);
73  void SetPoint1(float[3]);
75 
77 
80  vtkSetVector3Macro(Point2, double);
81  vtkGetVectorMacro(Point2, double, 3);
82  void SetPoint2(float[3]);
84 
86 
93  vtkSetMacro(UseRegularRefinement, bool);
94  vtkGetMacro(UseRegularRefinement, bool);
95  vtkBooleanMacro(UseRegularRefinement, bool);
97 
99 
103  vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
104  vtkGetMacro(Resolution, int);
106 
108 
117  void SetNumberOfRefinementRatios(int);
118  void SetRefinementRatio(int index, double value);
119  int GetNumberOfRefinementRatios();
120  double GetRefinementRatio(int index);
122 
124 
127  virtual void SetPoints(vtkPoints*);
128  vtkGetObjectMacro(Points, vtkPoints);
130 
132 
137  vtkSetMacro(OutputPointsPrecision, int);
138  vtkGetMacro(OutputPointsPrecision, int);
140 
141 protected:
142  vtkLineSource(int res = 1);
143  ~vtkLineSource() override;
144 
147  double Point1[3];
148  double Point2[3];
152  std::vector<double> RefinementRatios;
153 
159 
160 private:
161  vtkLineSource(const vtkLineSource&) = delete;
162  void operator=(const vtkLineSource&) = delete;
163 };
164 
165 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:147
vtkX3D::value
Definition: vtkX3D.h:226
vtkLineSource::RefinementRatios
std::vector< double > RefinementRatios
Definition: vtkLineSource.h:152
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkLineSource::Resolution
int Resolution
Definition: vtkLineSource.h:149
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkLineSource::Points
vtkPoints * Points
The list of points defining a broken line NB: The Point1/Point2 definition of a single line segment i...
Definition: vtkLineSource.h:158
vtkLineSource
create a line defined by two end points
Definition: vtkLineSource.h:60
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkLineSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkLineSource.h:150
vtkLineSource::UseRegularRefinement
bool UseRegularRefinement
Definition: vtkLineSource.h:151
vtkX3D::index
Definition: vtkX3D.h:252
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41