partio

本来是在找point clould读入的资信, 如point cloud to maya, 遇到partio这open souce project, 读读它的代码应该能学到东西, 于是故事就开始了.

引言

本来是在找point clould读入的资信, 如point cloud to maya, 遇到partio这open souce project from Disney Animation, 读读它的代码应该能学到东西, 于是故事就开始了.
“The goal of Partio is to provide a unified interface akin to unified image libraries that makes it easier to load, save, and manipulate particle files.”

安装libPNG and zlib

其实partio只需要zlib, 但是libPNG contain了zlib, 而且提供了zlib的vs project file, libPNG本身也是一个常用库, 于是就直接build libPNG and zlib好了. download libPNG source, download zlib source, update the zlib source information at file \lpng1610\projects\vstudio\zlib.props, for example, using zlib-1.2.8 version.

open the visual studio file at \lpng1610\projects\vstudio to build, they are 32bit libs by default, we can create x64 project setting too.

libpng is built as dynamic library, zlib is built as static library, \lpng1610\projects\vstudio\Debug\libpng16.lib libpng16.dll and zlib.lib \lpng1610\projects\vstudio\x64\Debug\libpng16.lib libpng16.dll and zlib.lib

然后让partio找到zlib. 方法一: 在\partio\CMakeLists.txt中更新zlib的信息: find_package(ZLIB) set(ZLIB_FOUND TRUE) set(ZLIB_INCLUDE_DIR E:\libraries\zlib-1.2.8) set(ZLIB_LIBRARY "E:\libraries\lpng1610\projects\vstudio\Debug\zlib.lib")

方法二: 把find_package(ZLIB) 改成 find_package(ZLIB REQUIRED) 效果是在cmake-gui.exe中做configuration的时候,会提示手动来设置zlib的目录信息?

用freeglut取代glut

To replace the glut with freeglut,