VTK  9.3.0
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 
45  vtkGetMacro(Resolution, int);
47 
49 
55  vtkGetObjectMacro(ParametricSpline, vtkParametricSpline);
58 
63 
69  double GetSummedLength() override;
70 
71 protected:
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 
89 private:
91  void operator=(const vtkAbstractSplineRepresentation&) = delete;
92 };
93 
94 VTK_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:29
tessellate parametric functions
parametric function for 1D interpolating splines
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:80
@ resolution
Definition: vtkX3D.h:466