X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=source%2Fmeshio.rst;fp=source%2Fmeshio.rst;h=c949e8fcc23ead9fa6c81fdf678e14e206395626;hb=05a7896c9fd0b68f79d5b1d44848094cd307a883;hp=0000000000000000000000000000000000000000;hpb=d24757f7f73615eed8d0cc89e4fff8e93db5e9a0;p=meshio%2Fmeshio_doc.git diff --git a/source/meshio.rst b/source/meshio.rst new file mode 100644 index 0000000..c949e8f --- /dev/null +++ b/source/meshio.rst @@ -0,0 +1,48 @@ +================================== +meshio +================================== + +.. toctree:: + :maxdepth: 2 + +C++で実装したpmd, mqoの読み書きライブラリ。本プロジェクトの本体。 +2次元画像のlibjpegやlibpngのような使い勝手のライブラリを目指している。 + +swigで作ったpythonバインディングでBlender addonを作っていたのだが +ビルド済みのCモジュールを提供するのはめんどくさいことがわかった。 +Blenderはpymeshioに切り離す方向で整理中。 +あと、luaバインディングを実験中。 + + +sample code(c++) +================================== +:: + + #include + #include + + + int main(int argc, char **argv) + { + using namespace meshio; + + if(argc<2){ + std::wcout << "usage: " << argv[0] << " {mqo file}" << std::endl; + return -1; + } + mqo::IO io; + if(!io.read(argv[1])){ + std::wcout << "fail to read " << argv[1] << std::endl; + return -1; + } + + for(std::vector::iterator it=io.materials.begin(); + it!=io.materials.end(); + ++it) + { + std::wcout << it->getName() << std::endl; + } + + return 0; + } +