VTK  9.3.1
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 
15 #include "vtkCurveRepresentation.h"
16 #include "vtkInteractionWidgetsModule.h" // For export macro
17 
18 VTK_ABI_NAMESPACE_BEGIN
21 class vtkPolyDataMapper;
22 
23 class VTKINTERACTIONWIDGETS_EXPORT vtkAbstractSplineRepresentation : public vtkCurveRepresentation
24 {
25 public:
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);
56  virtual void SetParametricSpline(vtkParametricSpline* spline);
58 
63 
69  double GetSummedLength() override;
70 
71 protected:
74 
75  void CleanRepresentation();
76 
77  void SetParametricSplineInternal(vtkParametricSpline* spline);
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 
89 private:
91  void operator=(const vtkAbstractSplineRepresentation&) = delete;
92 };
93 
94 VTK_ABI_NAMESPACE_END
95 #endif
base class for a widget that represents a curve that connects control points.
virtual void GetPolyData(vtkPolyData *pd)=0
Grab the polydata (including points) that defines the interpolating curve.
abstract representation for a spline.
virtual double GetSummedLength()=0
Get the approximate vs.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
dynamic, self-adjusting array of double
parametric function for 1D interpolating splines
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkDoubleArray * GetHandlePositions()=0
Set/Get the position of the handles.
map vtkPolyData to graphics primitives
vtkNew< vtkParametricFunctionSource > ParametricFunctionSource
tessellate parametric functions