The Parametric Pseudo-Manifold (PPS) Library 1.0
writer.h
Go to the documentation of this file.
00001 
00026 #ifndef WRITER_H
00027 #define WRITER_H
00028 
00029 #include <string>
00030 #include <fstream>
00031 
00045 namespace offlib {
00046 
00047 
00054   class Writer {
00055   public:
00056     // ---------------------------------------------------------------
00057     //
00058     // Public methods
00059     //
00060     // ---------------------------------------------------------------
00061 
00069     Writer( const std::string& fn ) ;
00070 
00071 
00079     Writer( const Writer& w ) ;
00080 
00081 
00087     ~Writer() {}
00088 
00089 
00101     void write( unsigned nv , double* vset , unsigned nf , unsigned* fset ) ; 
00102 
00103 
00104   private:
00105     // ---------------------------------------------------------------
00106     //
00107     // Private methods
00108     //
00109     // ---------------------------------------------------------------
00110  
00119     void write_header( unsigned nv , unsigned nf ) ;
00120 
00121 
00130     void write_vertices( unsigned nv , double* vset ) ;
00131 
00132 
00141     void write_faces( unsigned  nf , unsigned* fset ) ; 
00142 
00143 
00144     // ---------------------------------------------------------------
00145     //
00146     // Private data members 
00147     //
00148     // ---------------------------------------------------------------
00149 
00150     std::string _fname ;   
00151 
00152     std::fstream _fs ;     
00153 
00154   } ;
00155 
00156 }
00157  //end of group class.
00159 
00160 #endif    // WRITER_H