get_display_scene_3d_info — Get the depth or the index of instances in a displayed 3D scene.
get_display_scene_3d_info returns information on the 3D object models in the 3D scene Scene3D that have been displayed with display_scene_3d in the window WindowHandle. The requested information at the positions (Row, Column) is returned in Value.
The following values can be queried via Information:
The indices of the 3D object models that have been displayed at the positions (Row, Column). If no 3D object model was displayed at this position, -1 is returned. In order to retrieve this information, the parameter 'object_index_persistence' must have been set to 'true' with set_scene_3d_param.
The depth (i.e. the Z coordinate in the camera coordinate system) at the positions (Row, Column). If no 3D object model was displayed at one of these positions, -1.0 is returned for this position. In order to retrieve this information, the parameter 'depth_persistence' must have been set to 'true' with set_scene_3d_param.
The window coordinates Row, Column must be provided with respect to the current image part. As a consequence, these coordinates are subpixel coordinates. Given the current image part (row1,column1,row2, column2), the upper left corner corresponds to the coordinates (row1 - 0.5, col1 - 0.5). Accordingly, the bottom right corner corresponds to the coordinates (row2 - 0.5, col2 - 0.5). Use get_mposition_sub_pix or get_mbutton_sub_pix to obtain these coordinates directly.
Handle of the 3D scene.
Default value: 'depth'
List of values: 'depth', 'object_index'
Indices or the depth of the objects at (Row,Column).
get_display_scene_3d_info returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.
display_scene_3d, get_mbutton, get_mbutton_sub_pix, get_mposition, get_mposition_sub_pix