lookAt Method

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

lookAt(eyePoint: XYAndZ, targetPoint: XYAndZ, upVector: Vector3d, newExtents?: XAndY, frontDistance?: number, backDistance?: number): 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 XYAndZ The new location of the camera.
targetPoint XYAndZ 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 XAndY 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.

Returns - A ViewStatus indicating whether the camera was successfully positioned.

Defined in

Last Updated: 13 October, 2019