VTK  9.0.20201029
vtkSplineRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSplineRepresentation.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 =========================================================================*/
28 #ifndef vtkSplineRepresentation_h
29 #define vtkSplineRepresentation_h
30 
31 #include "vtkCurveRepresentation.h"
32 #include "vtkInteractionWidgetsModule.h" // For export macro
33 
34 class vtkActor;
35 class vtkCellPicker;
36 class vtkDoubleArray;
39 class vtkPlaneSource;
40 class vtkPoints;
41 class vtkPolyData;
42 class vtkProp;
43 class vtkProperty;
44 class vtkSphereSource;
45 class vtkTransform;
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkSplineRepresentation : public vtkCurveRepresentation
48 {
49 public:
50  static vtkSplineRepresentation* New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
61  void GetPolyData(vtkPolyData* pd) override;
62 
66  void SetNumberOfHandles(int npts) override;
67 
69 
73  void SetResolution(int resolution);
74  vtkGetMacro(Resolution, int);
76 
78 
86  virtual void SetParametricSpline(vtkParametricSpline*);
87  vtkGetObjectMacro(ParametricSpline, vtkParametricSpline);
89 
94 
100  double GetSummedLength() override;
101 
108  void InitializeHandles(vtkPoints* points) override;
109 
115  void BuildRepresentation() override;
116 
117 protected:
119  ~vtkSplineRepresentation() override;
120 
121  // The spline
124 
125  // The number of line segments used to represent the spline.
127 
128  // Specialized method to insert a handle on the poly line.
129  int InsertHandleOnLine(double* pos) override;
130 
131 private:
133  void operator=(const vtkSplineRepresentation&) = delete;
134 };
135 
136 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkCurveRepresentation::SetNumberOfHandles
virtual void SetNumberOfHandles(int npts)=0
Set/Get the number of handles for this widget.
vtkCurveRepresentation::InsertHandleOnLine
virtual int InsertHandleOnLine(double *pos)=0
Returns the position of insertion or -1 on fail.
vtkParametricFunctionSource
tessellate parametric functions
Definition: vtkParametricFunctionSource.h:56
vtkX3D::resolution
Definition: vtkX3D.h:472
vtkCurveRepresentation
vtkWidgetRepresentation base class for a widget that represents an curve that connects control points...
Definition: vtkCurveRepresentation.h:51
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:54
vtkCurveRepresentation::BuildRepresentation
void BuildRepresentation() override=0
These are methods that satisfy vtkWidgetRepresentation's API.
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
vtkParametricSpline
parametric function for 1D interpolating splines
Definition: vtkParametricSpline.h:47
vtkX3D::points
Definition: vtkX3D.h:452
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:41
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCurveRepresentation::GetPolyData
virtual void GetPolyData(vtkPolyData *pd)=0
Grab the polydata (including points) that defines the interpolating curve.
vtkSplineRepresentation::ParametricFunctionSource
vtkParametricFunctionSource * ParametricFunctionSource
Definition: vtkSplineRepresentation.h:123
vtkCurveRepresentation::InitializeHandles
virtual void InitializeHandles(vtkPoints *points)=0
Convenience method to allocate and set the handles from a vtkPoints instance.
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
vtkSplineRepresentation::ParametricSpline
vtkParametricSpline * ParametricSpline
Definition: vtkSplineRepresentation.h:122
vtkCurveRepresentation.h
vtkSplineRepresentation::Resolution
int Resolution
Definition: vtkSplineRepresentation.h:126
vtkCurveRepresentation::GetHandlePositions
virtual vtkDoubleArray * GetHandlePositions()=0
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:61
vtkCurveRepresentation::GetSummedLength
virtual double GetSummedLength()=0
Get the approximate vs.
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:66
vtkSplineRepresentation
representation for a spline.
Definition: vtkSplineRepresentation.h:47
vtkCurveRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.