Ignore:
Timestamp:
Apr 15, 2014, 9:06:46 AM (10 years ago)
Author:
sommeria
Message:

bugs corrected in browse_data and mouse_motion (z display)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_motion.m

    r738 r741  
    2525function mouse_motion(hObject,eventdata,handles)
    2626
    27 % if ~exist('handles','var')
    28 %     set(hCurrentFig,'Pointer','arrow');
    29 %     return
    30 % end
    3127FigData=get(hObject,'UserData');
    3228if ishandle(FigData)% case of a zoom plot, the handle of the parent rectangle is stored in UserData, its parent is the plotting axes of the rectangle
     
    8480% AxeData=[];%default
    8581xy=[];%default
     82set(hCurrentFig,'Units','normalized')
    8683xy_fig=get(hObject,'CurrentPoint');% current point of the current figure (gcbo)
    8784pointershape='arrow';% default pointer is an arrow
     
    218215            end
    219216            %display the z coordinate if defined by the projection plane
    220             if isfield(Field,'ObjectType') && strcmp(Field.ObjectType,'plane') && isfield(Field,'ObjectCoord') && length(Field.ObjectCoord)>=3
     217            if isfield(Field,'ProjObjectType') && strcmp(Field.ProjObjectType,'plane') && isfield(Field,'ProjObjectCoord') && length(Field.ProjObjectCoord)>=3
    221218                pos=[xy(1,1) xy(1,2) 0];
    222                 if isfield(Field,'ObjectAngle')&&~isequal(Field.ObjectAngle,[0 0 0])
    223                     om=norm(Field.ObjectAngle);%norm of rotation angle in radians
    224                     OmAxis=Field.ObjectAngle/om; %unit vector marking the rotation axis
     219                if isfield(Field,'ProjObjectAngle')&&~isequal(Field.ProjObjectAngle,[0 0 0])
     220                    om=norm(Field.ProjObjectAngle);%norm of rotation angle in radians
     221                    OmAxis=Field.ProjObjectAngle/om; %unit vector marking the rotation axis
    225222                    cos_om=cos(pi*om/180);
    226223                    sin_om=sin(pi*om/180);
     
    228225                    pos=cos_om*pos+sin_om*cross(OmAxis,pos)+(1-cos_om)*(OmAxis*pos')*OmAxis;
    229226                end
    230                 pos=pos+[Field.ObjectCoord 0];
     227               % pos=pos+[Field.ProjObjectCoord 0];
     228               pos=pos+Field.ProjObjectCoord;
    231229                text_displ_3=[text_displ_3 'x,y,z=' num2str(pos,4)];
    232230            end
Note: See TracChangeset for help on using the changeset viewer.