hhoppe/Mesh-processing-library 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 980 个 Star、139 次 Fork。
仓库全名
hhoppe/Mesh-processing-library
开源许可证
MIT License
Star 数
980
Fork 数
139
README 摘要
Mesh Processing Library This package contains C++ libraries and programs demonstrating mesh processing research published from 1992 to 2003, mostly in ACM SIGGRAPH: surface reconstruction from unorganized points, mesh optimization, subdivision surface fitting, mesh simplification, progressive meshes and geomorphs, view-dependent mesh refinement, smooth terrain level-of-detail, progressive simplicial complexes,…
This package contains C++ libraries and programs demonstrating mesh processing research
published from 1992 to 2003, mostly in ACM SIGGRAPH:
surface reconstruction from unorganized points, mesh optimization, subdivision surface fitting,
mesh simplification, progressive meshes and geomorphs, view-dependent mesh refinement, smooth terrain level-of-detail,
progressive simplicial complexes, optimized mesh traversal, and spherical parameterization.
The source code has been updated to modern C++ style and for cross-platform use.
Results rendered by the viewer G3dOGL.
Top: a set of points, an initial mesh reconstruction, and an optimized subdivision surface;
a spherical parameterization of a bunny;
a progressive simplicial complex (showing ~2,500 mixed-dim. simplices).
Bottom: a progressive mesh at coarse (800 faces) and full resolution;
view-dependent refinement of a terrain, showing its mesh on the left half.
The programs page shows these and other results together with the commands that create them.
The code compiles with recent C++23 compilers (gcc, clang, or Microsoft Visual C++)
on most platforms (Windows, Linux, WSL, macOS), or within a Docker container.
The steps are summarized below; see make/README.md for the requirements,
the build configurations and options, the unit tests,
and more on the demos.
On Linux, WSL, or macOS, using GNU make:
make -j # Build all programs (into bin/unix) and run the unit tests.
make -j demos # Also create, check, and view the demo results.
On Windows, open mesh_processing.sln in Microsoft Visual Studio and build the solution
(typically as ReleaseMD - x64, into bin/msbuild), then create and view the demo results:
The make commands also work on Windows, in a Cygwin or MSYS2 shell, with a choice of four configurations.
With Docker, on any platform:
docker build -f make/Dockerfile -t mesh-processing . # Build programs and run the unit tests.
docker run -it --rm mesh-processing # Start a shell with programs in the PATH.
Pressing the Esc key closes any open program window.
The demo scripts are in demos.
Programs
The programs read from stdin (or from files) and write to stdout, so that they combine into pipelines.
For example, the command
extracts a mesh with 1000 faces from a progressive mesh,
remeshes it as the zero isocontour of its signed-distance function on a 603 grid,
reports the genus of the new mesh, and shows it in an interactive viewer.
Show images and videos in an interactive viewer, with simple editing.
The directory bin also contains scripts:
mesh_to_pm creates a progressive mesh from a mesh (using MeshSimplify and Filterprog),
pm_simplify further simplifies the base mesh of a progressive mesh, and
obj_to_mesh, ply_to_mesh, mesh_to_obj, and mesh_to_ply convert between the mesh format (*.m) and
Wavefront *.obj or Stanford *.ply files.
All programs recognize the argument --help (or -?) to show their many options.
See progs/README.md for a description of each program with example commands,
and for the file formats.
Libraries
The library libHh
contains the main reusable classes.
All files include Hh.h which sets up a common cross-platform environment.
The libraries libHwWindows and libHwX
implement a simple windowing interface (class Hw),
under Win32 and the X Window System, respectively.
Both implementations support OpenGL rendering.
Each program (e.g., Filtermesh) lives in its own subdirectory of
progs
and links against these libraries.
评论