VTK  9.3.20240423
vtkAbstractSplineRepresentation.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
12#ifndef vtkAbstractSplineRepresentation_h
13#define vtkAbstractSplineRepresentation_h
14
16#include "vtkInteractionWidgetsModule.h" // For export macro
17
18VTK_ABI_NAMESPACE_BEGIN
22
23class VTKINTERACTIONWIDGETS_EXPORT vtkAbstractSplineRepresentation : public vtkCurveRepresentation
24{
25public:
27 void PrintSelf(ostream& os, vtkIndent indent) override;
28
36 void GetPolyData(vtkPolyData* pd) override;
37
39
44 void SetResolution(int resolution);
45 vtkGetMacro(Resolution, int);
47
49
55 vtkGetObjectMacro(ParametricSpline, vtkParametricSpline);
58
63
69 double GetSummedLength() override;
70
71protected:
74
76
78
79 // The spline
80 vtkParametricSpline* ParametricSpline = nullptr;
82
83 // The number of line segments used to represent the spline.
84 int Resolution = 499;
85
86 // the mapper supposed to display the spline
88
89private:
91 void operator=(const vtkAbstractSplineRepresentation&) = delete;
92};
93
94VTK_ABI_NAMESPACE_END
95#endif
abstract representation for a spline.
void SetResolution(int resolution)
Set/Get the number of line segments representing the spline for this widget.
vtkNew< vtkParametricFunctionSource > ParametricFunctionSource
vtkDoubleArray * GetHandlePositions() override
Get the position of the spline handles.
void GetPolyData(vtkPolyData *pd) override
Grab the polydata (including points) that defines the spline.
void SetParametricSplineInternal(vtkParametricSpline *spline)
double GetSummedLength() override
Get the approximate vs.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetParametricSpline(vtkParametricSpline *spline)
Set the parametric spline object.
base class for a widget that represents a curve that connects control points.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:160
tessellate parametric functions
parametric function for 1D interpolating splines
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips