MATLAB Function Reference
  Go to function:
    Search    Help Desk 
camlight    Examples

Create or move a Light object in camera coordinates

Syntax

Description

camlight('headlight') creates a Light at the camera position.

camlight('right') creates a Light right and up from camera.

camlight('left') creates a Light left and up from camera.

camlight with no argments is the same as camlight('right').

camlight(az,el) creates a Light at the specified azimuth (az) and elevation (el) with respect to the camera position. The camera target is the center of rotation and az and el are in degrees.

camlight(...,'style') The style argument can take on the two values:

camlight(light_handle,...) uses the Light specified in light_handle.

light_handle = camlight(...) returns the Light's handle.

Remarks

camlight sets the Light object Position and Style properties. A Light created with camlight will not track the camera. In order for the Light to stay in a constant position relative to the camera, you must call camlight whenever you move the camera.

Examples

This example creates a Light positioned to the left of the camera and then repositions the Light each time the camera is moved:



[ Previous | Help Desk | Next ]