VTK  9.1.0
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
28#include "vtkInteractionWidgetsModule.h" // For export macro
29
33
34class VTKINTERACTIONWIDGETS_EXPORT vtkAbstractSplineRepresentation : public vtkCurveRepresentation
35{
36public:
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);
69
74
80 double GetSummedLength() override;
81
82protected:
85
87
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
100private:
102 void operator=(const vtkAbstractSplineRepresentation&) = delete;
103};
104
105#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.
vtkWidgetRepresentation base class for a widget that represents an curve that connects control points...
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:113
Allocate and hold a VTK object.
Definition: vtkNew.h:165
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:195