internal void ApplyTransform(ref vtkTransform transform, string filename) { vtkPolyData polydata = vtkPolyData.New(); CreatePolydata(ref polydata); vtkTransformFilter transformFilter = vtkTransformFilter.New(); #if VTK_MAJOR_VERSION_5 transformFilter.SetInputConnection(polydata.GetProducerPort()); #else transformFilter.SetInputData(polydata); #endif transformFilter.SetTransform(transform); transformFilter.Update(); vtkXMLPolyDataWriter writer = vtkXMLPolyDataWriter.New(); writer.SetFileName(filename); #if VTK_MAJOR_VERSION_5 writer.SetInputConnection(transformFilter.GetOutputPort()); #else writer.SetInputData(transformFilter); #endif writer.Write(); }
internal void Write(string filename) { vtkPolyData polydata = vtkPolyData.New(); CreatePolydata(ref polydata); vtkXMLPolyDataWriter writer = vtkXMLPolyDataWriter.New(); writer.SetFileName(filename); #if VTK_MAJOR_VERSION_5 writer.SetInputConnection(polydata.GetProducerPort()); #else writer.SetInputData(polydata); #endif writer.Write(); }