MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuale Utente Pagina 324

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 500
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 323
9 Examples of GUIDE UIs
9-78
handles.light = hlight;
handles.tform = hgrotate;
handles.hmesh = hmesh;
handles.azimuth = 0.;
handles.cmap = cmap;
guidata(gcf,handles);
The call to guidata caches the data added to handles.
Moving either of the sliders sets both the elevation and the azimuth of the light source,
although each slider changes only one. The code in the callback for varying the elevation
of the light is
function sunelslider_Callback(hObject, eventdata, handles)
hlight = handles.light; % Get handle to light object
sunaz = get(handles.sunazslider,'value'); % Get current light azimuth
sunel = get(hObject,'value'); % Varies from -72.8 -> 72.8 deg
lightangle(hlight,sunaz,sunel) % Set the new light angle
The callback for the light azimuth slider works similarly, querying the elevation slider's
setting to keep that value from being changed in the call to lightangle.
Vedere la pagina 323
1 2 ... 319 320 321 322 323 324 325 326 327 328 329 ... 499 500

Commenti su questo manuale

Nessun commento