Skip to content

RhinoViewport.SetCameraTarget

Public Class

Set viewport target point. By default the camera location is translated so that the camera direction vector is parallel to the vector from the camera location to the target location.

Namespace: Rhino.Display

Assembly: RhinoCommon (in RhinoCommon.dll)

**Since:**5.0

Syntax

public void SetCameraTarget(
Point3d targetLocation,
bool updateCameraLocation
)

Parameters

targetLocation

Type: Rhino.Geometry.Point3d
new target location.

updateCameraLocation

Type:System.Boolean
if true, the camera location is translated so that the camera direction vector is parallel to the vector from the camera location to the target location. If false, the camera location is not changed.

Remarks

In general, Rhino users expect to have the camera direction vector and the vector from the camera location to the target location to be parallel. If you use the RhinoViewport functions to set the camera location, camera direction, and target point, then the relationship between these three points and vectors is automatically maintained. If you directly manipulate the camera properties, then you should carefully set the target by calling SetTarget() with updateCameraLocation=false.