lookAtVolume Method
Change the volume that this view displays, keeping its current rotation.
lookAtVolume(volume: Readonly<WritableLowAndHighXYZ> | Readonly<WritableLowAndHighXY>, aspect?: number, options?: MarginOptions & OnViewExtentsError): void
@note for 2d views, only the X and Y values of volume are used.
Parameter | Type | Description |
---|---|---|
volume | Readonly<WritableLowAndHighXYZ> | Readonly<WritableLowAndHighXY> | The new volume, in world-coordinates, for the view. The resulting view will show all of worldVolume, by fitting a view-axis-aligned bounding box around it. For views that are not aligned with the world coordinate system, this will sometimes result in a much larger volume than worldVolume. |
aspect | number | The X/Y aspect ratio of the view into which the result will be displayed. If the aspect ratio of the volume does not match aspect, the shorter axis is lengthened and the volume is centered. If aspect is undefined, no adjustment is made. |
options | MarginOptions & OnViewExtentsError | for providing MarginPercent and onExtentsError |
Returns - void
Defined in
- core/frontend/src/ViewState.ts Line 1013
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.