0001 function h = bm_edit_app_view3d_plot_surf(...
0002 obj, axes_h, V, F, face_color, alpha, max_mode)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0025 if ~exist('axes_h', 'var'), error('axes_h is a required parameter.'); end
0026 if ~exist('V', 'var'), error('V is a required parameter.'); end
0027 if ~exist('F', 'var'), error('F is a required parameter.'); end
0028 if ~exist('face_color','var') | isempty(face_color),
0029 face_color = [0.8 0.7 0.6];
0030 end
0031 if ~exist('alpha', 'var')
0032 alpha = 0.9;
0033 end
0034 if ~exist('max_mode','var') | isempty(max_mode), max_mode=0; end;
0035
0036
0037
0038
0039
0040 set(gcf, 'CurrentAxes', axes_h);
0041
0042
0043 h = patch('Faces',F,'Vertices',V,'FaceColor',face_color,'EdgeColor','none', 'FaceAlpha', alpha);
0044
0045 lighting phong;
0046 material dull;
0047 axis equal;
0048
0049 xlabel('X');
0050 ylabel('Y');
0051 zlabel('Z');
0052
0053 if max_mode == 1
0054 Vmax = max(V);
0055 Vmin = min(V);
0056 xlim([Vmin(1) Vmax(1)]);
0057 ylim([Vmin(2) Vmax(2)]);
0058 zlim([Vmin(3) Vmax(3)]);
0059 end