cameratoolbar

Control camera toolbar programmatically

Syntax

cameratoolbar
cameratoolbar('NoReset')
cameratoolbar('SetMode',mode)
cameratoolbar('SetCoordSys',coordsys)
cameratoolbar('Show')
cameratoolbar('Hide')
cameratoolbar('Toggle')
cameratoolbar('ResetCameraAndSceneLight')
cameratoolbar('ResetCamera')
cameratoolbar('ResetSceneLight')
cameratoolbar('ResetTarget')
h = cameratoolbar(...)
mode = cameratoolbar('GetMode')
paxis = cameratoolbar('GetCoordsys')
tf = cameratoolbar('GetVisible')
cameratoolbar('Close')
cameratoolbar(fig,...)

Description

cameratoolbar creates a toolbar that enables interactive manipulation of the axes camera and light when you drag the mouse on the figure window. Several axes camera properties are set when the toolbar is initialized.

cameratoolbar('NoReset') creates the toolbar without setting any camera properties.

cameratoolbar('SetMode',mode) sets the toolbar mode (depressed button). mode can be 'orbit', 'orbitscenelight', 'pan', 'dollyhv', 'dollyfb', 'zoom', 'roll', 'nomode'. For descriptions of the various modes, see Camera Toolbar. You can also set these modes using the toolbar, by clicking the respective buttons.

cameratoolbar('SetCoordSys',coordsys) sets the principal axis of the camera motion. coordsys can be: 'x', 'y', 'z', 'none'.

cameratoolbar('Show') shows the toolbar on the current figure.

cameratoolbar('Hide') hides the toolbar on the current figure.

cameratoolbar('Toggle') toggles the visibility of the toolbar.

cameratoolbar('ResetCameraAndSceneLight') resets the current camera and scenelight.

cameratoolbar('ResetCamera') resets the current camera.

cameratoolbar('ResetSceneLight') resets the current scenelight.

cameratoolbar('ResetTarget') resets the current camera target.

h = cameratoolbar(...) returns the handle to the toolbar.

mode = cameratoolbar('GetMode') returns the current mode.

paxis = cameratoolbar('GetCoordsys') returns the current principal axis.

tf = cameratoolbar('GetVisible') returns the visibility of the toolbar (1 if visible, 0 if not visible).

cameratoolbar('Close') removes the toolbar from the current figure.

cameratoolbar(fig,...) specifies the figure to operate on by passing the figure handle as the first argument.

In general, the use of OpenGL hardware improves rendering performance.

Alternatives

Display the toolbar by selecting Camera Toolbar from the figure window's View menu.

Introduced before R2006a