VTK  9.2.6
vtkAbstractSplineRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractSplineRepresentation.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 =========================================================================*/
24 #ifndef vtkAbstractSplineRepresentation_h
25 #define vtkAbstractSplineRepresentation_h
26 
27 #include "vtkCurveRepresentation.h"
28 #include "vtkInteractionWidgetsModule.h" // For export macro
29 
32 class vtkPolyDataMapper;
33 
34 class VTKINTERACTIONWIDGETS_EXPORT vtkAbstractSplineRepresentation : public vtkCurveRepresentation
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
47  void GetPolyData(vtkPolyData* pd) override;
48 
50 
55  void SetResolution(int resolution);
56  vtkGetMacro(Resolution, int);
58 
60 
66  vtkGetObjectMacro(ParametricSpline, vtkParametricSpline);
67  virtual void SetParametricSpline(vtkParametricSpline* spline);
69 
74 
80  double GetSummedLength() override;
81 
82 protected:
85 
86  void CleanRepresentation();
87 
88  void SetParametricSplineInternal(vtkParametricSpline* spline);
89 
90  // The spline
91  vtkParametricSpline* ParametricSpline = nullptr;
93 
94  // The number of line segments used to represent the spline.
95  int Resolution = 499;
96 
97  // the mapper supposed to display the spline
99 
100 private:
102  void operator=(const vtkAbstractSplineRepresentation&) = delete;
103 };
104 
105 #endif
vtkWidgetRepresentation base class for a widget that represents an 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:90
dynamic, self-adjusting array of double
parametric function for 1D interpolating splines
a simple class to control print indentation
Definition: vtkIndent.h:39
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