CameraWindowZoomOperator

class Operators.Camera.CameraWindowZoomOperator()

Methods

Operators.Camera.CameraWindowZoomOperator.addMapping()

inherited

addMapping(button: Button, modifier: KeyModifiers?): void

Adds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid. All mappings require a mouse button, but a key modifier is optional.

Parameters

button: Button

modifier: KeyModifiers = KeyModifiers.None

Returns: void

Operators.Camera.CameraWindowZoomOperator.clearMapping()

inherited

clearMapping(): void

Clears any button and key modifier mappings for the operator.

Returns: void

Operators.Camera.CameraWindowZoomOperator.doZoom()
doZoom(rectMin: Point2, rectMax: Point2): Promise

Parameters

rectMin: Point2

rectMax: Point2

Returns: Promise

Operators.Camera.CameraWindowZoomOperator.getComputeTarget()
getComputeTarget(): boolean

Returns whether a new camera target will be computed using selection. See [[setComputeTarget]]

Returns: boolean

Operators.Camera.CameraWindowZoomOperator.getPreserveViewAngle()
getPreserveViewAngle(): boolean

Gets whether to maintain a constant view angle while zooming. See [[setPreserveViewAngle]].

Returns: boolean

Operators.Camera.CameraWindowZoomOperator.setComputeTarget()
setComputeTarget(compute: boolean): void

When enabled, the camera target will be computed using selection while zooming. This can provide a better zoom behavior in perspective projection mode, but comes at the cost of performing a selection on the model during each zoom operation, which may not be ideal for performance on large models.

This setting is disabled by default.

Parameters

compute: boolean

Returns: void

Operators.Camera.CameraWindowZoomOperator.setMapping()

inherited

setMapping(button: Button, modifier: KeyModifiers?): void

Sets the button and key modifier mapping for the operator.

Parameters

button: Button

modifier: KeyModifiers = KeyModifiers.None

Returns: void

Operators.Camera.CameraWindowZoomOperator.setPreserveViewAngle()
setPreserveViewAngle(preserve: boolean): void

Sets whether to maintain a constant view angle while zooming. If enabled, when zooming causes the camera’s field of view to shrink or grow, the camera’s position will also be moved toward or away from the target, respectively.

This may prevent confusing camera behavior when perspective projection is used or might be used. When using only orthographic projection, it is better to disable this.

If window zoom is being using in conjunction with mouse wheel zoom this setting should be the same in both.

This setting is enabled by default.

Parameters

preserve: boolean

Returns: void