Main Content

camorient

Set or query camera orientation in trackingGlobeViewer

Description

orient = camorient(viewer) returns the current orientation of the camera.

example

camorient(viewer,orientation) sets the camera orientation of the tracking globe viewer.

Examples

collapse all

Create a tracking globe viewer and show the globe.

viewer = trackingGlobeViewer;
drawnow
snapshot(viewer)

Change the camera orientation to look up into space.

orient = [150 -44 0];
camorient(viewer,orient);

Take a snapshot and show the results.

drawnow
snapshot(viewer)

Input Arguments

collapse all

Tracking globe viewer, specified as a trackingGlobeViewer object.1

Orientation of the camera, specified as a three-element real-valued vector in the form [yaw pitch roll], where:

  • yaw is the yaw angle in degrees, specified as a scalar in the range [-360 360].

  • pitch is the pitch angle in degrees, specified as a scalar in the range [-90 90].

  • roll is the roll angle in degrees, specified as a scalar in the range [-360 360].

Output Arguments

collapse all

Current orientation of the camera, returned as a three-element real-valued vector in the form [yaw pitch roll], where:

  • yaw is the yaw angle in degrees, returned as a scalar in the range [-360 360].

  • pitch is the pitch angle in degrees, returned as a scalar in the range [-90 90].

  • roll is the roll angle in degrees, returned as a scalar in the range [-360 360].

Version History

Introduced in R2021b

1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.