added conversion helpers for matlab

added examples for using the python wrappers in matlab
This commit is contained in:
Daniele Panozzo
2015-10-07 01:49:58 +02:00
parent 9f467b8009
commit 4e4cadbbcf
12 changed files with 220 additions and 186 deletions
+18
View File
@@ -0,0 +1,18 @@
%% Launch the external viewer
launch_viewer;
%% Load a mesh in OFF format
V = py.igl.eigen.MatrixXd();
F = py.igl.eigen.MatrixXi();
py.igl.readOFF('../tutorial/shared/beetle.off', V, F);
%% Scale the x coordinate in matlab
V = p2m(V);
V(:,1) = V(:,1) * 2;
V = m2p(V);
%% Plot the mesh
viewer = py.tcpviewer_single.TCPViewer();
viewer.data.set_mesh(V, F);
viewer.launch();