Path: Common/Graphics

% This function creates a GUI for manipulating the camera view.

 Initialize by supplying an axis handle. If no input is provided it will
 point to the current axis (gca).

 This GUI does not provide direct control over the camera target.
 Set the camera target of axes "h" to vector "v" with this command:
 Move in/out changes the distance from the camera to the target.
 Zoom in/out changes the view angle of the camera.
 Adjust azimuth and elevation to change the orientation of the camera
   while keeping the distance constant.

 The azimuth and elevation angles are defined in a local xyz coordinate

   x: along the direction of the camera target vector. 
   y: cross product of z and x, completes right-handed system
   z: cross product of x and the supplied forward vector

 Note that the "forward" vector is not an axis property, and so it must 
 be supplied directly to the CameraControls GUI.

     % Initialize and use current axes (gca)
     tag = CameraControls;

     % Initialize with specified axes
     tag = CameraControls( axisHandle );    

     % Set the forward vector
     CameraControls( 'set forward vector', tag, forwardVector );

     % Update the view
           CameraControls( 'update', tag );

     % Update the view with a new forward vector
     CameraControls( 'update', tag, forwardVector );    
   axisHandle      (1,1)   Handle to the axes for controlling the camera
   tag             (1,:)   Tag to the GUI.
 See also:  AnimationGUI


Common: General/GetNewTag
Common: Transform/RotMat
Math: Linear/Cross
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/Unit

Back to the Common Module page