VTK
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 =========================================================================*/
31 #ifndef vtkSplineRepresentation_h
32 #define vtkSplineRepresentation_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
35 #include "vtkCurveRepresentation.h"
36 
37 class vtkActor;
38 class vtkCellPicker;
39 class vtkDoubleArray;
42 class vtkPlaneSource;
43 class vtkPoints;
44 class vtkPolyData;
45 class vtkProp;
46 class vtkProperty;
47 class vtkSphereSource;
48 class vtkTransform;
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkSplineRepresentation : public vtkCurveRepresentation
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
65 
69  virtual void SetNumberOfHandles(int npts);
70 
72 
77  vtkGetMacro(Resolution,int);
79 
81 
90  vtkGetObjectMacro(ParametricSpline,vtkParametricSpline);
92 
97 
103  double GetSummedLength();
104 
112 
118  virtual void BuildRepresentation();
119 
120 protected:
123 
124  // The spline
127 
128  // The number of line segments used to represent the spline.
130 
131  // Specialized method to insert a handle on the poly line.
132  virtual void InsertHandleOnLine(double* pos);
133 
134 private:
135  vtkSplineRepresentation(const vtkSplineRepresentation&) VTK_DELETE_FUNCTION;
136  void operator=(const vtkSplineRepresentation&) VTK_DELETE_FUNCTION;
137 
138 };
139 
140 #endif
141 
142 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkSplineRepresentation::GetPolyData
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that defines the spline.
vtkSplineRepresentation::SetResolution
void SetResolution(int resolution)
Set/Get the number of line segments representing the spline for this widget.
vtkSplineRepresentation::InitializeHandles
void InitializeHandles(vtkPoints *points)
Convenience method to allocate and set the handles from a vtkPoints instance.
vtkSplineRepresentation::SetNumberOfHandles
virtual void SetNumberOfHandles(int npts)
Set the number of handles for this widget.
vtkParametricFunctionSource
tessellate parametric functions
Definition: vtkParametricFunctionSource.h:60
vtkX3D::resolution
@ resolution
Definition: vtkX3D.h:466
vtkCurveRepresentation
vtkWidgetRepresentation base class for a widget that represents an curve that connects control points...
Definition: vtkCurveRepresentation.h:50
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:61
vtkSplineRepresentation::BuildRepresentation
virtual void BuildRepresentation()
These are methods that satisfy vtkWidgetRepresentation's API.
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
vtkSplineRepresentation::InsertHandleOnLine
virtual void InsertHandleOnLine(double *pos)
vtkSplineRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkParametricSpline
parametric function for 1D interpolating splines
Definition: vtkParametricSpline.h:54
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtkSplineRepresentation::SetParametricSpline
virtual void SetParametricSpline(vtkParametricSpline *)
Set the parametric spline object.
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:47
vtkSplineRepresentation::GetHandlePositions
vtkDoubleArray * GetHandlePositions()
Get the position of the spline handles.
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkSplineRepresentation::~vtkSplineRepresentation
~vtkSplineRepresentation()
vtkSplineRepresentation::ParametricFunctionSource
vtkParametricFunctionSource * ParametricFunctionSource
Definition: vtkSplineRepresentation.h:126
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:125
vtkCurveRepresentation.h
vtkSplineRepresentation::vtkSplineRepresentation
vtkSplineRepresentation()
vtkSplineRepresentation::Resolution
int Resolution
Definition: vtkSplineRepresentation.h:129
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:42
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:65
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:70
vtkSplineRepresentation
representation for a spline.
Definition: vtkSplineRepresentation.h:51
vtkSplineRepresentation::GetSummedLength
double GetSummedLength()
Get the approximate vs.