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