Main Content

setView

Set view of 3D environment

Since R2024b

    Description

    setView(world,viewport) sets the view specified by viewport as the view of the 3D environment in the Simulation 3D Viewer window.

    If you do not set the view, the software sets the last created viewport as the view.

    Input Arguments

    collapse all

    World object where the created viewport is set as the view and displayed in the Simulation 3D Viewer window, specified as a sim3d.World object. You can view the fields in the viewport structure from the Viewports property of the sim3d.World object.

    Handle to the viewport created using the createViewport function, specified as a character array or string.

    Example: viewport = viewport1

    Version History

    Introduced in R2024b