VTK  9.0.1
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:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
61  void GetPolyData(vtkPolyData* pd) override;
62 
66  void SetNumberOfHandles(int npts) override;
67 
69 
74  vtkGetMacro(Resolution, int);
76 
78 
87  vtkGetObjectMacro(ParametricSpline, vtkParametricSpline);
89 
94 
100  double GetSummedLength() override;
101 
109 
115  void BuildRepresentation() override;
116 
117 protected:
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:34
vtkSplineRepresentation::~vtkSplineRepresentation
~vtkSplineRepresentation() override
vtkSplineRepresentation::SetResolution
void SetResolution(int resolution)
Set/Get the number of line segments representing the spline for this widget.
vtkSplineRepresentation::InsertHandleOnLine
int InsertHandleOnLine(double *pos) override
Returns the position of insertion or -1 on fail.
vtkParametricFunctionSource
tessellate parametric functions
Definition: vtkParametricFunctionSource.h:57
vtkX3D::resolution
@ resolution
Definition: vtkX3D.h:472
vtkSplineRepresentation::GetPolyData
void GetPolyData(vtkPolyData *pd) override
Grab the polydata (including points) that defines the spline.
vtkCurveRepresentation
vtkWidgetRepresentation base class for a widget that represents an curve that connects control points...
Definition: vtkCurveRepresentation.h:52
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:55
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:55
vtkParametricSpline
parametric function for 1D interpolating splines
Definition: vtkParametricSpline.h:48
vtkSplineRepresentation::InitializeHandles
void InitializeHandles(vtkPoints *points) override
Convenience method to allocate and set the handles from a vtkPoints instance.
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkSplineRepresentation::SetParametricSpline
virtual void SetParametricSpline(vtkParametricSpline *)
Set the parametric spline object.
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:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkSplineRepresentation::GetHandlePositions
vtkDoubleArray * GetHandlePositions() override
Get the position of the spline handles.
vtkSplineRepresentation::BuildRepresentation
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkSplineRepresentation::SetNumberOfHandles
void SetNumberOfHandles(int npts) override
Set the number of handles for this widget.
vtkSplineRepresentation::ParametricFunctionSource
vtkParametricFunctionSource * ParametricFunctionSource
Definition: vtkSplineRepresentation.h:123
vtkSplineRepresentation::GetSummedLength
double GetSummedLength() override
Get the approximate vs.
vtkSplineRepresentation::New
static vtkSplineRepresentation * New()
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkSplineRepresentation::ParametricSpline
vtkParametricSpline * ParametricSpline
Definition: vtkSplineRepresentation.h:122
vtkCurveRepresentation.h
vtkSplineRepresentation::vtkSplineRepresentation
vtkSplineRepresentation()
vtkSplineRepresentation::Resolution
int Resolution
Definition: vtkSplineRepresentation.h:126
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:36
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:62
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:67
vtkSplineRepresentation
representation for a spline.
Definition: vtkSplineRepresentation.h:48
vtkSplineRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.