VTK  9.0.1
vtkPolyLineRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyLineRepresentation.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 =========================================================================*/
29 #ifndef vtkPolyLineRepresentation_h
30 #define vtkPolyLineRepresentation_h
31 
32 #include "vtkCurveRepresentation.h"
33 #include "vtkInteractionWidgetsModule.h" // For export macro
34 
35 class vtkPolyLineSource;
36 class vtkPoints;
37 class vtkPolyData;
38 
39 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyLineRepresentation : public vtkCurveRepresentation
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
54  void GetPolyData(vtkPolyData* pd) override;
55 
59  void SetNumberOfHandles(int npts) override;
60 
65 
70  double GetSummedLength() override;
71 
78  void InitializeHandles(vtkPoints* points) override;
79 
83  void BuildRepresentation() override;
84 
85 protected:
87  ~vtkPolyLineRepresentation() override;
88 
89  // The poly line source
91 
92  // Specialized method to insert a handle on the poly line.
93  int InsertHandleOnLine(double* pos) override;
94 
95 private:
97  void operator=(const vtkPolyLineRepresentation&) = delete;
98 };
99 
100 #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.
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.
vtkCurveRepresentation::BuildRepresentation
void BuildRepresentation() override=0
These are methods that satisfy vtkWidgetRepresentation's API.
vtkPolyLineRepresentation
vtkWidgetRepresentation for a poly line.
Definition: vtkPolyLineRepresentation.h:39
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPolyLineSource
create a poly line from a list of input points
Definition: vtkPolyLineSource.h:31
vtkCurveRepresentation::GetPolyData
virtual void GetPolyData(vtkPolyData *pd)=0
Grab the polydata (including points) that defines the interpolating curve.
vtkCurveRepresentation::InitializeHandles
virtual void InitializeHandles(vtkPoints *points)=0
Convenience method to allocate and set the handles from a vtkPoints instance.
vtkCurveRepresentation.h
vtkPolyLineRepresentation::PolyLineSource
vtkPolyLineSource * PolyLineSource
Definition: vtkPolyLineRepresentation.h:90
vtkCurveRepresentation::GetHandlePositions
virtual vtkDoubleArray * GetHandlePositions()=0
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkCurveRepresentation::GetSummedLength
virtual double GetSummedLength()=0
Get the approximate vs.
vtkCurveRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.