VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkX3DExporterWriter.h 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 =========================================================================*/ 00023 #ifndef __vtkX3DExporterWriter_h 00024 #define __vtkX3DExporterWriter_h 00025 00026 #include <vtkObject.h> 00027 00028 // Forward declarations 00029 class vtkDataArray; 00030 class vtkUnsignedCharArray; 00031 class vtkCellArray; 00032 00033 class VTK_HYBRID_EXPORT vtkX3DExporterWriter : public vtkObject 00034 { 00035 public: 00036 vtkTypeMacro(vtkX3DExporterWriter, vtkObject); 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 00040 00042 virtual int OpenFile(const char* file) = 0; 00043 // Closes the file if open 00044 virtual void CloseFile() = 0; 00045 // Flush can be called optionally after some operations to 00046 // flush the buffer to the filestream. A writer not necessarily 00047 // implements this function 00048 virtual void Flush() {}; 00050 00053 virtual void StartDocument() = 0; 00054 00057 virtual void EndDocument() = 0; 00058 00060 00064 virtual void StartNode(int nodeID) = 0; 00065 virtual void EndNode() = 0; 00067 00071 virtual void SetField(int attributeID, const char* value, bool mfstring = false) = 0; 00072 00075 virtual void SetField(int attributeID, int) = 0; 00076 00079 virtual void SetField(int attributeID, float) = 0; 00080 00083 virtual void SetField(int attributeID, double) = 0; 00084 00087 virtual void SetField(int attributeID, bool) = 0; 00088 00092 virtual void SetField(int attributeID, int type, const double* a) = 0; 00093 00097 virtual void SetField(int attributeID, int type, vtkDataArray* a) = 0; 00098 00102 virtual void SetField(int attributeID, const double* values, size_t size) = 0; 00103 00108 virtual void SetField(int attributeID, const int* values, size_t size, bool image = false) = 0; 00109 00114 protected: 00115 vtkX3DExporterWriter(); 00116 ~vtkX3DExporterWriter(); 00117 00118 private: 00119 vtkX3DExporterWriter(const vtkX3DExporterWriter&); // Not implemented. 00120 void operator=(const vtkX3DExporterWriter&); // Not implemented. 00121 }; 00122 #endif 00123