1. src 源碼目錄
-
common: 項目和插件常用到的功能函數和classes
-
external: 依賴的第三方庫的源碼,例如:
-
lib3ds
Autodesk 3D Studio文件C語言庫.
-
muparser
Fast mathematical expressions parser library.
-
OpenCTM
Library for compression of 3D triangle meshes.
-
bzip2
File compression program that uses the Burrows–Wheeler algorithm.
-
jhead
Extract and manipulate JPEG EXIFinformation of photos.
-
levmar
The Levenberg-Marquardt algorithm is an iterative technique that finds a local minimum ofa function that is expressed as the sum of squares of nonlinear functions.通用的非線性最小二乘算法庫.
-
glew
The OpenGL Extension Wrangler Library.
-
qhull
Qhullcomputes the convex hull, Delaunay triangulation, Voronoi diagram, halfspaceintersection about a point, furthest-site Delaunay triangulation, andfurthest-site Voronoi diagram. It runs in 2-d, 3-d, 4-d, and higher dimensions.研究解決凸包問題.
-
-
meshlab: 核心功能和GUI實現
- 程序入口(MainWindow的實現,分別在mainwindow_RunTime和mainwindow_Init文件中)
- 各種Actions(Render部分的生成,在rendermodeactions文件中)
- Menus、Toolbars、Dialog等
-
meshlabserver: 運行在cmd的meshlab工具,常用於批量處理。
-
meshlabplugins: 插件集合
meshlab中插件的加載有二種方式:
- 一種是遍歷插件目錄中的dll文件,進行加載。
- 另一種是遍歷插件目錄中的xml文件(例如:filter_measure.xml),通過判斷是否存在與xml文件同名的dll文件和xml文件中是否包含javascript,進行不同方式的加載。
其中,插件中的對話框等UI部分,都是通過MeshlabStdDialog和MeshLabXMLStdDialog二個類生成的。
MeshLab對其功能的擴展是通過插件來實現的,通過實現不同的接口,可以將插件放在不同的菜單下或工具欄上。例如:MeshFilterInterface接口,用於實現Filter菜單下的插件。
常見插件例如:
-
filter_meshing
Mesh網格處理:縮放、移動、旋轉,細分面,刪除重復頂點等。
-
filter_select
提供多種選擇和刪除方式。
-
filter_layer
Mesh層操作。例如:刪除/復制/重命名Mesh層、合並Mesh層等。
-
io_base
導入/導出一些3D文件。例如:STL,PLY, OBJ等。
-
decorate_base
繪制坐標軸、頂點、邊角、邊框、網格、標簽、特征柱狀圖等。
-
edit_manipulators
鼠標和鍵盤鍵進行操作:縮放、平移和旋轉。
-
edit_align
Mesh拼接。
-
edit_hole
Mesh補洞。
-
edit_measure
測量Mesh中選定距離。
-
render_gdp
着色器:遍歷加載與處理.gdp文件。
-
render_rfx
着色器:遍歷加載與處理.rfx文件。
-
sampleplugins
擴展插件示例源碼的目錄。
-
use_cpu_opengl: 僅用於Windows平台,用於非GPU加速的OpenGL調用
-
vcglib: 核心功能庫(項目子模塊)
vcglib采用標准C++開發,封裝了IO,OpenGL等功能。核心功能如下:
- 提供 Mesh(triangular mesh,tetrahedral mesh,三角網格或四面體網格)數據結構的定義,該數據結構支持對 Mesh數據的快速訪問(拓撲信息、空間查詢等)以及高效執行網格上算法;
- 在 Mesh數據結構基礎上,實現大量高效的網格算法,如網格修補、平滑、變形、曲率計算、細分、泊松盤采樣、等值面計算等;
- IO支持,讀寫 PLY、OBJ、STL、3DS、OFF、DXF 等格式網格文件;
- UI 支持,如 OpenGL網格顯示,Trackball交互等。
目錄結構:
-
vcg
整個庫的核心,定義了所有的算法和數據結構。
-
wrap
包含一些針對特定需求/上下文/庫的VCG概念的封裝。例如:很多格式的網格數據的導入和導出,用OpenGL渲染三角形網格的代碼等。
-
eigenLib
線性代數庫,VCGLib中的高級矩陣操作基於這個庫。
插件類圖(繼承關系)