框架:https://ustc-gcl-f.github.io/code/index.html#sec_surface_framework
第三方库
- OpenMesh
- Qt
brew install open-mesh
brew info open-mesh
安装路径:/opt/homebrew/Cellar/open-mesh/11.0.0
brew install qt@5 <- 注意框架只支持Qt5
brew install --cask qt-creator
安装路径:/opt/homebrew/Cellar/qt/6.7.0_1
Qt Creator配置参考:MAC安装并配置Qt
框架配置
https://github.com/USTC-GCL-F/Surface-Mesh-Framework
克隆库至本地,打开Cmakelists.txt,修改
# 修改16-19行 Qt5
set(Qt5Core_DIR /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/cmake/Qt5Core)
set(Qt5Gui_DIR /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/cmake/Qt5Gui)
set(Qt5OpenGL_DIR /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/cmake/Qt5OpenGL)
set(Qt5Widgets_DIR /opt/homebrew/Cellar/qt@5/5.15.13_1/lib/cmake/Qt5Widgets)
# 修改27-29行 path
SET(EIGEN_PATH "/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3")
SET(OPENMESH_PATH "/opt/homebrew/Cellar/open-mesh/11.0.0/include")
SET(OPENMESH_LIB_PATH "/opt/homebrew/Cellar/open-mesh/11.0.0/lib")
新建build文件夹
.
├── Cmakelists.txt
├── README.md
├── build
└── src
cd build
cmake ../
make
此时build文件夹中出现可执行项目SurfaceFramework,双击打开
框架测试
下载测试obj文件:AMMesh/example/hw1/alien.obj