get normal vector [USAGE] [normal_vector] = surf_data_get_normal_vector(<obj>); [IN] obj : surf_data object [OUT] normal_vector : normal vector Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [normal_vector] = surf_data_get_normal_vector(obj) 0002 % get normal vector 0003 % [USAGE] 0004 % [normal_vector] = surf_data_get_normal_vector(<obj>); 0005 % [IN] 0006 % obj : surf_data object 0007 % [OUT] 0008 % normal_vector : normal vector 0009 % 0010 % Copyright (C) 2011, ATR All Rights Reserved. 0011 % License : New BSD License(see VBMEG_LICENSE.txt) 0012 0013 % 0014 % --- Previous check 0015 % 0016 if ~exist('obj', 'var'), error('obj is a required parameter.'); end 0017 if ~strcmp(obj.class_type, 'surf_data') 0018 error('class type is invalid.'); 0019 end 0020 0021 % 0022 % --- Main Procedure 0023 % 0024 normal_vector = obj.xx;