display_element object constructor. But this class is virtual class(used by surf_element class ...) [USAGE] [obj] = vb_display_element_new(<name>, <coord_type>); [IN] name : <<char array>> name of this element coord_type : coordinate space of this element belongs to. [OUT] obj : display_element object Author: rhayashi Created: 2007-07-17 Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj] = vb_display_element_new(name, coord_type) 0002 % display_element object constructor. 0003 % But this class is virtual class(used by surf_element class ...) 0004 % [USAGE] 0005 % [obj] = vb_display_element_new(<name>, <coord_type>); 0006 % [IN] 0007 % name : <<char array>> name of this element 0008 % coord_type : coordinate space of this element belongs to. 0009 % [OUT] 0010 % obj : display_element object 0011 % 0012 % Author: rhayashi 0013 % Created: 2007-07-17 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('name', 'var'), error('name is a required parameter.'); end 0022 if ~exist('coord_type', 'var') 0023 error('coord_type is a required parameter.'); 0024 end 0025 0026 % 0027 % --- Main Procedure 0028 % 0029 obj = struct; 0030 obj.class_name = 'display_element'; 0031 obj.name = name; 0032 obj.coord_type = coord_type; 0033 0034 % 0035 % --- After check 0036 % 0037 if nargout ~= 1 0038 error('function caller should receive obj.'); 0039 end