Changeset 432 for trunk/src/mouse_down.m
- Timestamp:
- May 25, 2012, 8:59:59 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_down.m
r429 r432 311 311 ObjectData=read_GUI(hset_object); %read object parameters in the GUI set_object 312 312 IndexObj=length(UvData.Object); 313 %initiate a new object 314 if isempty(UvData.Object{IndexObj});313 %initiate a new object (no data .Coord yet recorded) 314 if ~isfield(UvData.Object{IndexObj},'Coord'); 315 315 ObjectData.Coord=[]; 316 316 ObjectNameNew=ObjectData.Name; … … 318 318 ObjectNameNew=ObjectData.Type; 319 319 end 320 % add an index to the object name if the proposed name already exists 321 322 320 % add an index to the object name if the proposed name already exists 323 321 vers=0;% index of the name 324 322 ListObject=get(hhuvmat.ListObject,'String'); … … 345 343 set(hhuvmat.ViewObject,'Value',1) 346 344 end 347 % ObjectData.Coord=[]; %reset previous object coordinates348 % ObjectData.Coord(1,1)=xy(1,1); % the object first coordinate is set by the mouse position349 % ObjectData.Coord(1,2)=xy(1,2);350 % if isfield(AxeData,'ObjectCoord') && size(AxeData.ObjectCoord,2)==3351 % ObjectData.Coord(1,3)=AxeData.ObjectCoord(1,3); %generaliser au cas avec angle352 % end353 345 ObjectData.Coord=[ObjectData.Coord ;xy(1,1:2)];% append the coordinates marked by the mouse to the object 354 % if isfield(AxeData,'ObjectCoord') && size(AxeData.ObjectCoord,2)==3 355 % xy(1,3)=AxeData.ObjectCoord(1,3); % z coordinate of the mouse: to generalise ... 356 % else 357 % xy(1,3)=0; % z coordinate set to 0 by default 358 % end 359 % if ~isequal(ObjectData.Coord,xy(1,:)) 360 % ObjectData.Coord=[ObjectData.Coord ;xy(1,1:2)];% append the coordinates marked by the mouse to the object 361 % end 362 363 AxeData.CurrentObject=plot_object(ObjectData,[],haxes,'m');%draw the object and its handle becomes AxeData.CurrentObject 364 % if isfield(UvData,'Object') 365 % IndexObj=length(UvData.Object)+1;% add the object as index IndexObj on the list of the interface 366 % else 367 % IndexObj=2;% the first object is used for uvmat display or blank 368 % end 346 hobject=UvData.Object{IndexObj}.DisplayHandle.(fig_tag); 347 if isempty(hobject) 348 hobject=haxes; 349 end 350 ProjObject=UvData.Object{get(hhuvmat.ListObject_1,'Value')}; 351 AxeData.CurrentObject=plot_object(ObjectData,ProjObject,hobject,'m');%draw the object and its handle becomes AxeData.CurrentObject 369 352 UvData.Object{IndexObj}=ObjectData; 370 UvData.Object{IndexObj}.DisplayHandle _uvmat=AxeData.CurrentObject;371 UvData.Object{IndexObj}.DisplayHandle_view_field=AxeData.CurrentObject;353 UvData.Object{IndexObj}.DisplayHandle.(fig_tag)=AxeData.CurrentObject;% attribute the current plot object handle to the Object 354 %UvData.Object{IndexObj}.DisplayHandle_view_field=AxeData.CurrentObject; 372 355 set(huvmat,'UserData',UvData) 373 356 PlotData=get(AxeData.CurrentObject,'UserData');
Note: See TracChangeset
for help on using the changeset viewer.