00001 #pragma once 00002 00003 #include "IMeshWriter.h" 00004 00005 #include <string> 00006 #include <fstream> 00007 00008 class AMVisualExporter : 00009 public MeshWrite::IMeshWriter 00010 { 00011 public: 00012 AMVisualExporter(const std::string & file_name); 00013 ~AMVisualExporter(void); 00014 00019 bool Init() ; 00020 00023 void Free() ; 00024 00027 void WriteVerticesCount(const int noVert) ; 00028 00031 void WriteVertex(double coords[]) ; 00032 00035 void WriteElementCount(const int noElems) ; 00036 00040 void WriteElement(int vertices[], int neighbours[]) ; 00041 00042 protected: 00043 00044 std::string _file_name; 00045 std::fstream _file; 00046 };