camlightdelete

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.2, Creation date: 2022-05-20, Last change: 2025-08-18

just removes all camlighs in a gca



See Also: VLFLcamlight , camlightTL

Example Illustration

 missing image of camlightdelete

Syntax

camlightdelete

Examples


SGbox;
camlightTL; pause; camlightdelete




Copyright 2022-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

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.

Input Parameters

The function camlightdelete does not take any input parameters. It operates on the current axes of the active figure in MATLAB.

Algorithm Steps

  1. Retrieve all child objects of the current axes using get(gca, 'Children'). This returns a list of handles to all objects contained within the current axes.
  2. Identify objects of type 'Light' using findobj(h, 'Type', 'Light'). This function searches through the list of child objects and returns handles to those that are of type 'Light'.
  3. Delete the identified light objects using delete(li). This command removes all light sources from the current axes, effectively deleting any lighting effects applied to the 3D plot.

Output

The function does not return any output. Its effect is visual, as it removes lighting from the current plot.

Example Usage

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

Related Functions

Algorithm explaination created using ChatGPT on 2025-08-18 21:49. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21