get surface status [USAGE] [bool_value] = surf_data_get_status(<obj>); [IN] obj : surf_data object [OUT] bool_value : true @ surface is closed. false @ surface is not closed. status : status defined define_bm_edit_app() SURFACE_CLOSED SURFACE_NOT_CLOSED Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [bool_value] = surf_data_is_closed(obj) 0002 % get surface status 0003 % [USAGE] 0004 % [bool_value] = surf_data_get_status(<obj>); 0005 % [IN] 0006 % obj : surf_data object 0007 % [OUT] 0008 % bool_value : true @ surface is closed. 0009 % false @ surface is not closed. 0010 % 0011 % status : status defined define_bm_edit_app() 0012 % SURFACE_CLOSED 0013 % SURFACE_NOT_CLOSED 0014 % 0015 % Copyright (C) 2011, ATR All Rights Reserved. 0016 % License : New BSD License(see VBMEG_LICENSE.txt) 0017 0018 % 0019 % --- Previous check 0020 % 0021 if ~exist('obj', 'var'), error('obj is a required parameter.'); end 0022 if ~strcmp(obj.class_type, 'surf_data') 0023 error('class type is invalid.'); 0024 end 0025 0026 % 0027 % --- Main Procedure 0028 % 0029 const = define_bm_edit_app; 0030 switch(obj.status) 0031 case const.surf_status.SURFACE_CLOSED 0032 bool_value = true; 0033 case const.surf_status.SURFACE_NOT_CLOSED 0034 bool_value = false; 0035 otherwise 0036 error('surf_data status is invalid.'); 0037 end