39 #include "vtkObjectFactory.h"
41 #include "vtkIdList.h"
42 #include "vtkSmartPointer.h"
66 vtkIdType N = iPolyData->GetNumberOfPoints();
69 std::stringstream oMyString;
71 oMyString << N <<
" ";
73 for ( vtkIdType i = 0; i < N; i++ )
75 iPolyData->GetPoint(i, pt);
76 oMyString << pt[0] <<
" " << pt[1] <<
" " << pt[2] <<
" ";
79 vtkSmartPointer< vtkIdList >
80 cell_points = vtkSmartPointer< vtkIdList >::New();
82 vtkIdType NbOfPointsInCell;
83 N = iPolyData->GetNumberOfCells();
84 oMyString << N <<
" ";
86 for ( vtkIdType i = 0; i < N; i++ )
88 iPolyData->GetCellPoints(i, cell_points);
89 NbOfPointsInCell = cell_points->GetNumberOfIds();
90 oMyString << NbOfPointsInCell <<
" ";
92 for ( vtkIdType k = 0; k < NbOfPointsInCell; k++ )
94 oMyString << cell_points->GetId(k) <<
" ";
98 return oMyString.str();
~vtkPolyDataMySQLMeshWriter()
Reads a string and convert it into a mesh polydata.
std::string GetMySQLText(vtkPolyData *iPolyData)
vtkStandardNewMacro(vtkPolyDataMySQLMeshWriter)
vtkPolyDataMySQLMeshWriter()
vtkCxxRevisionMacro(vtkPolyDataMySQLMeshWriter,"$Revision$")