poI3DViewCtrl SetFocalLength

Sets the focal length of the current of specified view.

Syntax

poI3DViewCtrl_handle SetFocalLengthvalue name

Application

HyperView Tcl Modify

Description

The focal length value simulates the focal length of a camera lens. Adjusting this value is similar to zooming.

Inputs

value
Float value specifying focal length.
name
String specifying the name of the view to be modified. If a name is not specified, the current view will be modified.

Example

To set the focal length of a view named "View 1" to 35.5:
hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetViewControlHandle view_handle
view_handle SetFocalLength 35.5 “View 1”
hwi CloseStack

Error

Returns HW_InvalidHandle if the view handle is invalid.

Returns HW_InvalidArgs if the value is less than 0 (needs to be updated based on sensor height).