lookAt Method

Position the camera for this view and point it at a new target point.

lookAt(eyePoint: Readonly<WritableXYAndZ>, targetPoint: Readonly<WritableXYAndZ>, upVector: Vector3d, newExtents?: Readonly<WritableXAndY>, frontDistance?: number, backDistance?: number, opts?: ViewChangeOptions): ViewStatus

note If the aspect ratio of viewDelta does not match the aspect ratio of a Viewport into which this view is displayed, it will be adjusted when the Viewport is synchronized from this view.

Parameter Type Description
eyePoint Readonly<WritableXYAndZ> The new location of the camera.
targetPoint Readonly<WritableXYAndZ> The new location to which the camera should point. This becomes the center of the view on the focus plane.
upVector Vector3d A vector that orients the camera's "up" (view y). This vector must not be parallel to the vector from eye to target.
newExtents Readonly<WritableXAndY> The new size (width and height) of the view rectangle. The view rectangle is on the focus plane centered on the targetPoint.
If newExtents is undefined, the existing size is unchanged.
frontDistance number The distance from the eyePoint to the front plane. If undefined, the existing front distance is used.
backDistance number The distance from the eyePoint to the back plane. If undefined, the existing back distance is used.
opts ViewChangeOptions for providing onExtentsError

Returns - ViewStatus

A ViewStatus indicating whether the camera was successfully positioned.

Defined in

Last Updated: 12 June, 2024