Main Content

campos

R2026b

Set or get camera position

Since R2026b

    Description

    Add-On Required: This feature requires the 3D Scenarios add-on.

    campos(v,pos) sets the camera position for viewer v.

    posOut = campos(v,pos) sets the camera position for viewer v and returns it.

    posOut = campos(v) gets the current camera position for viewer v.

    Input Arguments

    collapse all

    Viewer, specified as a GlobeViewer object.

    Camera position, specified as a geospatial table containing a geopointshape object. The geospatial table must have one row, and the geopointshape object must specify a 3D point.

    If you specify the camera position so that the camera is level with or below the terrain, then the campos function sets the camera height to a value one meter above the terrain.

    You can create a geospatial table from latitude, longitude, and height coordinates by using the pointtable function.

    Output Arguments

    collapse all

    Camera position, returned as a geospatial table containing a geopointshape object. The height reference for the geopointshape object is the WGS84 ellipsoid.

    Version History

    Introduced in R2026b

    See Also

    Objects

    Functions