00001 00015 #ifndef __POT_WRITER_H__ 00016 #define __POT_WRITER_H__ 00017 00018 #include <writer/writer.h> 00019 #include <octree/oct_struct.h> 00020 00024 typedef unsigned int Data; 00025 00029 const Data LEAF= 0; 00030 00034 const Data INNER_NODE= 1; 00035 00042 class PotWriter : public Writer, private OctStruct { 00043 public: 00048 PotWriter(const char* fileName); 00049 00053 virtual ~PotWriter(); 00054 00059 virtual const char* getFormatName(); 00060 00065 virtual const FormatType getFormatType(); 00066 00081 virtual void writeFile(IndexOct* tree) 00082 throw (WriteFileException*); 00083 00084 private: 00094 void binWrite(Data data); 00095 00099 void flushWrite(); 00100 00105 const size_t getCachSize(); 00106 00110 void writeInnerNode(); 00111 00116 void writeLeaf(Color color); 00117 00122 void writeTree(Node node); 00123 00124 // ##### Variablen ################################################### 00125 00129 const char* fileName; 00130 00134 FILE* potFile; 00135 00139 size_t wCount; 00140 00144 Data wBinary; 00145 }; 00146 00147 #endif // ! __POT_WRITER_H__