#ifndef VTKHSWPOLYLINEWIDGET_H
#define VTKHSWPOLYLINEWIDGET_H
/*
* ModuleName: vtkHSWPolylineWidget
* Description: 实现多边形折线
* Author: hsw
* Date: 2020-03-22
*
*/
#include <vtkSmartPointer.h>
#include <vtkDataSetMapper.h>
#include <vtkLine.h>
#include <vtkCellArray.h>
#include <vtkPoints.h>
#include <vtkPolyData.h>
class vtkHSWPolylineWidget
{
public:
vtkHSWPolylineWidget();
~vtkHSWPolylineWidget();
public:
vtkSmartPointer<vtkDataSetMapper> createPolyLine(int pointCnt, double* points);
private:
vtkSmartPointer<vtkPoints> _polylinePoints;
vtkSmartPointer<vtkLine > _polylineCell;
vtkSmartPointer<vtkCellArray> _polylineCellArray;
vtkSmartPointer<vtkPolyData> _polylineData;
vtkSmartPointer<vtkDataSetMapper> _polylineMapper;
};
#endif // VTKHSWPOLYLINEWIDGET_H
#include "vtkhswpolylinewidget.h"
vtkHSWPolylineWi