Changeset 425 for trunk/src/update_obj.m


Ignore:
Timestamp:
May 17, 2012, 10:55:41 AM (12 years ago)
Author:
sommeria
Message:

improvement of object management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/update_obj.m

    r379 r425  
    2525%plot uvmat
    2626for iobj=1:length(Object_out) %change the view of all existing objects on the updated current object #IndexObj_1
    27      hobject=[];
     27    hobject=[];
    2828    if isfield(Object_out{iobj},'DisplayHandle_uvmat') && ~isempty(Object_out{iobj}.DisplayHandle_uvmat) && ishandle(Object_out{iobj}.DisplayHandle_uvmat)
    2929        hobject=Object_out{iobj}.DisplayHandle_uvmat;%graphic handle of object #iobj in the uvmat plot
    3030    end
    31     Object_out{iobj}.DisplayHandle_uvmat=plot_object(Object_out{iobj},Object_out{IndexObj_1},hobject,'m');%update the object representation of Object_out{iobj} on Object_out{IndexObj_1}
     31    if ~isequal(iobj,IndexObj_1)% object not visible when projected on itself
     32        Object_out{iobj}.DisplayHandle_uvmat=plot_object(Object_out{iobj},Object_out{IndexObj_1},hobject,'m');%update the object representation of Object_out{iobj} on Object_out{IndexObj_1}
     33        if isempty(Object_out{iobj}.DisplayHandle_uvmat)&&~isempty(hobject)
     34            delete(hobject)
     35        end
     36    end
    3237end
    3338% plot view_field
Note: See TracChangeset for help on using the changeset viewer.