VTK  9.5.20250901
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
151#ifndef vtkLineSource_h
152#define vtkLineSource_h
153
154#include "vtkFiltersSourcesModule.h" // For export macro
155#include "vtkPolyDataAlgorithm.h"
156#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
157
158#include <vector> // for std::vector
159VTK_ABI_NAMESPACE_BEGIN
160class vtkPoints;
161
162class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkLineSource : public vtkPolyDataAlgorithm
163{
164public:
167 void PrintSelf(ostream& os, vtkIndent indent) override;
168
170
173 vtkSetVector3Macro(Point1, double);
174 vtkGetVectorMacro(Point1, double, 3);
175 void SetPoint1(float[3]);
177
179
182 vtkSetVector3Macro(Point2, double);
183 vtkGetVectorMacro(Point2, double, 3);
184 void SetPoint2(float[3]);
186
188
195 vtkSetMacro(UseRegularRefinement, bool);
196 vtkGetMacro(UseRegularRefinement, bool);
197 vtkBooleanMacro(UseRegularRefinement, bool);
199
201
205 vtkSetClampMacro(Resolution, int, 1, VTK_INT_MAX);
206 vtkGetMacro(Resolution, int);
208
210
220 void SetRefinementRatio(int index, double value);
222 double GetRefinementRatio(int index);
224
226
229 virtual void SetPoints(vtkPoints*);
230 vtkGetObjectMacro(Points, vtkPoints);
232
234
239 vtkSetMacro(OutputPointsPrecision, int);
240 vtkGetMacro(OutputPointsPrecision, int);
242
243protected:
244 vtkLineSource(int res = 1);
245 ~vtkLineSource() override;
246
249 double Point1[3];
250 double Point2[3];
254 std::vector<double> RefinementRatios;
255
261
262private:
263 vtkLineSource(const vtkLineSource&) = delete;
264 void operator=(const vtkLineSource&) = delete;
265};
266
267VTK_ABI_NAMESPACE_END
268#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create a line defined by two end points
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 RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
std::vector< double > RefinementRatios
static vtkLineSource * New()
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.
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:139
Superclass for algorithms that produce only polydata as output.
#define VTK_INT_MAX
Definition vtkType.h:161
#define VTK_MARSHALAUTO