00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkFacetWriter.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00038 #ifndef __vtkFacetWriter_h 00039 #define __vtkFacetWriter_h 00040 00041 #include "vtkPolyDataAlgorithm.h" 00042 00043 class vtkInformation; 00044 00045 class VTK_IO_EXPORT vtkFacetWriter : public vtkPolyDataAlgorithm 00046 { 00047 public: 00048 static vtkFacetWriter *New(); 00049 vtkTypeRevisionMacro(vtkFacetWriter,vtkPolyDataAlgorithm); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00054 vtkSetStringMacro(FileName); 00055 vtkGetStringMacro(FileName); 00057 00059 void Write(); 00060 00061 // BTX 00062 void WriteToStream(ostream* ost); 00063 // ETX 00064 00065 protected: 00066 vtkFacetWriter(); 00067 ~vtkFacetWriter(); 00068 00069 // This is called by the superclass. 00070 // This is the method you should override. 00071 virtual int RequestData(vtkInformation *request, 00072 vtkInformationVector** inputVector, 00073 vtkInformationVector* outputVector); 00074 00075 virtual int FillInputPortInformation(int, vtkInformation *); 00076 00077 // BTX 00078 int WriteDataToStream(ostream* ost, vtkPolyData* data); 00079 // ETX 00080 00081 char *FileName; 00082 ostream *OutputStream; 00083 00084 private: 00085 vtkFacetWriter(const vtkFacetWriter&); // Not implemented. 00086 void operator=(const vtkFacetWriter&); // Not implemented. 00087 }; 00088 00089 #endif 00090