rotate3dlight([tog])
tog : | 'on', 'off', or toggle by no parameter |
rotate3dlight
rotate3dlight off
rotate3dlight on
This function, rotate3dlight
, is designed to toggle the automatic camera lighting conditions in a 3D plot environment. It is part of the SG-Library and was introduced to manage lighting conditions efficiently, especially for large surface plots.
tog
using getfuncparams
. If no parameter is provided, it defaults to an empty string, which acts as a toggle.WindowButtonMotionFcn
property of the current figure (gcf
).WindowButtonMotionFcn
is empty, it sets it to 'camlightTL;'
, which enables the automatic camera lighting.WindowButtonMotionFcn
is not empty, it clears it by setting it to an empty string, effectively disabling the automatic camera lighting.tog
:tog
is 'on', it sets the WindowButtonMotionFcn
to 'camlightTL;'
, enabling the lighting.tog
is 'off', it sets the WindowButtonMotionFcn
to an empty string, disabling the lighting.shg
to bring the current figure window to the front.There are no explicit switch conditions in this function, but the behavior is controlled by the tog
parameter and the current state of the WindowButtonMotionFcn
.