Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkXMLPolyDataWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLPolyDataWriter.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 =========================================================================*/
00032 #ifndef __vtkXMLPolyDataWriter_h
00033 #define __vtkXMLPolyDataWriter_h
00034 
00035 #include "vtkXMLUnstructuredDataWriter.h"
00036 
00037 class vtkPolyData;
00038 
00039 class VTK_IO_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter
00040 {
00041 public:
00042   vtkTypeRevisionMacro(vtkXMLPolyDataWriter,vtkXMLUnstructuredDataWriter);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044   static vtkXMLPolyDataWriter* New();
00045 
00046   //BTX
00048 
00049   vtkPolyData* GetInput();
00050   //ETX
00052   
00054   const char* GetDefaultFileExtension();
00055   
00056 protected:
00057   vtkXMLPolyDataWriter();
00058   ~vtkXMLPolyDataWriter();  
00059 
00060   // see algorithm for more info
00061   virtual int FillInputPortInformation(int port, vtkInformation* info);
00062 
00063   const char* GetDataSetName();
00064 
00065   virtual void AllocatePositionArrays();
00066   virtual void DeletePositionArrays();
00067    
00068   void WriteInlinePieceAttributes();
00069   void WriteInlinePiece(vtkIndent indent);
00070   
00071   void WriteAppendedPieceAttributes(int index);
00072   void WriteAppendedPiece(int index, vtkIndent indent);
00073   void WriteAppendedPieceData(int index);
00074 
00075   virtual vtkIdType GetNumberOfInputCells();
00076   void CalculateSuperclassFraction(float* fractions);
00077 
00078   // Positions of attributes for each piece.
00079   unsigned long* NumberOfVertsPositions;
00080   unsigned long* NumberOfLinesPositions;
00081   unsigned long* NumberOfStripsPositions;
00082   unsigned long* NumberOfPolysPositions;
00083 
00084   OffsetsManagerArray *VertsOM;
00085   OffsetsManagerArray *LinesOM;
00086   OffsetsManagerArray *StripsOM;
00087   OffsetsManagerArray *PolysOM;
00088 
00089 private:
00090   vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&);  // Not implemented.
00091   void operator=(const vtkXMLPolyDataWriter&);  // Not implemented.
00092 };
00093 
00094 #endif

Generated on Mon Jan 21 23:07:32 2008 for VTK by  doxygen 1.4.3-20050530