Changeset 179 for trunk/src/update_obj.m
- Timestamp:
- Jan 9, 2011, 12:56:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/update_obj.m
r159 r179 21 21 22 22 %% default input and output 23 % Object_out{IndexObj}=ObjectData;%default24 % if isfield(UvData,'Object')25 % Object_set=UvData.Object;26 % else27 % Object_set={};%create the object28 % end29 23 Object_out=UvData.Object; 30 24 31 %% plot the field projected on the object32 % ProjData= proj_field(UvData.Field,ObjectData,IndexObj);%project the current interface field on ObjectData33 % if ~isempty(ProjData)34 % plotaxes=[];%default35 % if length(Object_set)>= IndexObj && isfield(Object_set{IndexObj},'plotaxes')36 % plotaxes=Object_set{IndexObj}.plotaxes;37 % [PlotType,Object_out{IndexObj}.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotHandles);%update an existing field plot38 % plotfig=get(plotaxes,'parent');39 % ViewData=get(plotfig,'UserData');40 % eval(41 % else42 % hview_field=view_field(ProjData);%create a new field plot with view_field43 % hhview_field=guidata(hview_field);44 % plotaxes=hhview_field.axes3;45 % end46 % Object_out{IndexObj}.plotaxes=plotaxes;47 % end48 25 49 26 %% representation of the different objects in the plots uvmat and view_field 50 51 27 %plot uvmat 52 28 for iobj=1:length(Object_out) %change the view of all existing objects on the updated current object #IndexObj_1 53 29 hobject=[]; 54 30 if isfield(Object_out{iobj},'DisplayHandle_uvmat') && ~isempty(Object_out{iobj}.DisplayHandle_uvmat) && ishandle(Object_out{iobj}.DisplayHandle_uvmat) 55 hobject=Object_out{iobj}.DisplayHandle_uvmat; 31 hobject=Object_out{iobj}.DisplayHandle_uvmat;%graphic handle of object #iobj in the uvmat plot 56 32 end 57 33 Object_out{iobj}.DisplayHandle_uvmat=plot_object(Object_out{iobj},Object_out{IndexObj_1},hobject,'m');%update the object representation … … 62 38 hobject=[]; 63 39 if isfield(Object_out{iobj},'DisplayHandle_view_field') && ~isempty(Object_out{iobj}.DisplayHandle_view_field) && ishandle(Object_out{iobj}.DisplayHandle_view_field) 64 hobject=Object_out{iobj}.DisplayHandle_view_field; 65 % else 66 % hobject=plotaxes; 40 hobject=Object_out{iobj}.DisplayHandle_view_field;%graphic handle of object #iobj in the view_field plot 67 41 end 68 42 Object_out{iobj}.DisplayHandle_view_field=plot_object(Object_out{iobj},Object_out{IndexObj_2},hobject,'m');%update the object representation 69 43 end 70 44 end 71 % end72 73 % if isfield(Object_set{iobj},'plotaxes')74 % haxes=Object_set{iobj}.plotaxes;% axes for the field plot75 % if ishandle(haxes) && isequal(get(haxes,'Type'),'axes')% update the representation of the object IndexObj on this axes if it exists76 % testupdate=0;77 % HandlesDisplay=[];%default78 % if length(Object_set)>= IndexObj && isfield(Object_set{IndexObj},'HandlesDisplay')79 % HandlesDisplay=Object_set{IndexObj}.HandlesDisplay;%list of handles of object representations80 % end81 % hplot_list=findobj(haxes,'Tag','proj_object');%list of projection objects on the axes82 % for ih=1:length(HandlesDisplay)83 % plot_detect=find(hplot_list==HandlesDisplay(ih));84 % if ~isempty(plot_detect)85 % Object_out.HandlesDisplay(ih)=plot_object(ObjectData,Object_set{iobj},HandlesDisplay(ih),'m');%update the the object representation86 % testupdate=1;87 % break88 % end89 % end90 % if ~testupdate% draw new object plot91 % hh=plot_object(ObjectData,Object_set{iobj},haxes,'m');%draw the object with the new object data92 % if isfield(Object_out,'HandlesDisplay')93 % Object_out.HandlesDisplay=[Object_out.HandlesDisplay hh];94 % else95 % Object_out.HandlesDisplay=hh;96 % end97 % PlotData=get(hh,'UserData');98 % PlotData.IndexObj=IndexObj;99 % set(hh,'UserData',PlotData); %record the object index in the graph100 % end101 % end102 % end103 % end104 45 105 46 106 47 107 48 49
Note: See TracChangeset
for help on using the changeset viewer.