Viewport.SetView (Vector3D, Vector3D, Boolean, Int32, Boolean) Method

Sets the view direction of the camera to the specified direction.
Public Sub SetView( _ 
ByVal direction As Vector3D, _ 
ByVal upVector As Vector3D, _ 
Optional ByVal fit As Boolean = false, _ 
Optional ByVal margin As Integer = 10, _ 
Optional ByVal selectedOnly As Boolean = false _ 
)
This language is not supported or no code example is available.
public void SetView( 
Vector3D direction
Vector3D upVector
bool fit = false, 
int margin = 10, 
bool selectedOnly = false 
)
This language is not supported or no code example is available.

Parameters

direction
Vector3D

The new camera direction

upVector
Vector3D

The camera up vector

fit
bool

if true fits the scene in the viewport

margin
int

Pixels margin from the border, if fit is true

selectedOnly
bool

If fit is true, fits only the selected entities

Remarks
 
The orientation of the camera is performed with an animation if Environment.AnimateCamera is true

.NET Framework

Supported in: 4.8

In this article

Definition