MATLAB Function Reference |
Control camera toolbar programmatically
Syntax
cameratoolbar camreatoolbar('NoReset') cameratoolbar('SetMode',mode
) cameratoolbar('SetCoordSys',coordsys
) cameratoolbar('Show') cameratoolbar('Hide') cameratoolbar('Toggle') cameratoolbar('ResetCameraAndSceneLight') cameratoolbar('ResetCamera') cameratoolbar('ResetSceneLight') cameratoolbar('ResetTarget') mode = cameratoolbar('GetMode') paxis = cameratoolbar('GetCoordsys') vis = cameratoolbar('GetVisible') cameratoolbar(fig,...) h = cameratoolbar cameratoolbar('Close')
Description
cameratoolbar
creates a new toolbar that enables interactive manipulation of the axes camera and light when users drag the mouse on the figure window. Several axes camera properties are set when the toolbar is initialized.
camreatoolbar('NoReset')
creates the toolbar without setting any camera properties.
cameratoolbar('SetMode',
sets the toolbar mode (depressed button). mode
)
mode
can be: 'orbit'
, 'orbitscenelight'
, 'pan'
, 'dollyhv'
, 'dollyfb'
, 'zoom'
, 'roll'
, 'nomode'
.
cameratoolbar('SetCoordSys',
sets the principal axis of the camera motion. coordsys
)
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.
mode = cameratoolbar('GetMode')
returns the current mode.
paxis = cameratoolbar('GetCoordsys')
returns the current principal axis.
vis = cameratoolbar('GetVisible')
returns the visibility of the toolbar (1
if visible, 0
if not visible).
cameratoolbar(fig,...)
specifies the figure to operate on by passing the figure handle as the first argument.
h = cameratoolbar
returns the handle to the toolbar.
cameratoolbar('Close')
removes the toolbar from the current figure.
Note that, in general, the use of OpenGL hardware improves rendering performance.
See Also
camdolly | camlight |
© 1994-2005 The MathWorks, Inc.