Focus {
SFFloat focalDistance 0 # [0, inf)
SFFloat focalLength 0 # [0, inf)
SFFloat maxFocalDistance 0 # [0, inf)
SFFloat minFocalDistance 0 # [0, inf)
}
The Focus node allows the user to define a controllable focus for a Camera device.
The Focus node should be set in the focus field of a Camera node.
The focal distance can be adjusted from the controller program using the wb_camera_set_focal_distance function.
-
The
focalDistancefield defines the distance to the focusing plane (i.e. the object we want to focus on). -
The
focalLengthfield defines the distance from the optical centre of the lens to the sensor. Bigger this value is, larger the sharp area is. -
The
maxFocalDistanceand theminFocalDistancefields define respectively the maximum and minimum values for the focal distance of the camera focus. Hence, they represent the minimum and maximum values that can be passed to thewb_camera_set_focal_distancefunction and they can be retrieved using thewb_camera_get_min_focal_distanceandwb_camera_get_max_focal_distancefunctions.