camlightdelete
SGbox;
camlightTL; pause; camlightdelete
This function, camlightdelete
, is designed to remove all light sources of type 'Light' from the current axes in a MATLAB figure. It is part of the SolidGeometry library, specifically for visualization purposes.
The function camlightdelete
does not take any input parameters. It operates on the current axes of the active figure in MATLAB.
get(gca, 'Children')
. This returns a list of handles to all objects contained within the current axes.findobj(h, 'Type', 'Light')
. This function searches through the list of child objects and returns handles to those that are of type 'Light'.delete(li)
. This command removes all light sources from the current axes, effectively deleting any lighting effects applied to the 3D plot.The function does not return any output. Its effect is visual, as it removes lighting from the current plot.
The function can be used in a sequence of commands to manipulate lighting in a 3D plot:
SGbox; % Create a 3D box camlightTL; % Add a light source pause; % Pause to view the effect camlightdelete; % Remove the light source
VLFLcamlight
: Another function related to lighting in the VLFL library.camlightTL
: A function to add a light source to the current axes.