Skip to content

display_scene_3dDisplayScene3dDisplayScene3ddisplay_scene_3dT_display_scene_3d🔗

Short description🔗

display_scene_3dDisplayScene3dDisplayScene3ddisplay_scene_3dT_display_scene_3d — Display a 3D scene.

Signature🔗

display_scene_3d( window WindowHandle, scene_3d Scene3D, integer CameraIndex )void DisplayScene3d( const HTuple& WindowHandle, const HTuple& Scene3D, const HTuple& CameraIndex )static void HOperatorSet.DisplayScene3d( HTuple windowHandle, HTuple scene3D, HTuple cameraIndex )def display_scene_3d( window_handle: HHandle, scene_3d: HHandle, camera_index: Union[int, str] ) -> None

Herror T_display_scene_3d( const Htuple WindowHandle, const Htuple Scene3D, const Htuple CameraIndex )

void HScene3D::DisplayScene3d( const HWindow& WindowHandle, const HTuple& CameraIndex ) const

void HScene3D::DisplayScene3d( const HWindow& WindowHandle, const HString& CameraIndex ) const

void HScene3D::DisplayScene3d( const HWindow& WindowHandle, const char* CameraIndex ) const

void HScene3D::DisplayScene3d( const HWindow& WindowHandle, const wchar_t* CameraIndex ) const (Windows only)

void HScene3D.DisplayScene3d( HWindow windowHandle, HTuple cameraIndex )

void HScene3D.DisplayScene3d( HWindow windowHandle, string cameraIndex )

Description🔗

display_scene_3dDisplayScene3d displays the 3D scene Scene3Dscene3Dscene_3d in the window WindowHandlewindowHandlewindow_handle. The view of the camera CameraIndexcameraIndexcamera_index is used to render the scene. Note that sometimes the aspect ratio of WindowHandlewindowHandlewindow_handle should be similar to width and height of the camera in order to obtain the wanted results. See create_scene_3dCreateScene3d for a short example.

display_scene_3dDisplayScene3d requires OpenGL 2.1, GLSL 1.2, and the OpenGL extensions GL_EXT_framebuffer_object and GL_EXT_framebuffer_blit. Otherwise the compatibility mode with less requirements but lower quality is automatically enabled. On graphics cards with low memory the following error messages could occur if rendering in a window with high resolution:

Low level error: ‘Incomplete attachment’

Unhanded Exception: ‘Required framebuffer object is unsupported’\ Solutions:

Set the parameter 'quality'"quality" to 'low'"low" using set_scene_3d_paramSetScene3dParam or use the compatibility mode to reduce the requirements of the graphics card.

The system variable (see set_systemSetSystem) 'opengl_compatibility_mode_enable'"opengl_compatibility_mode_enable" can be set to 'true'"true" to permanently enable the visualization in compatibility mode with lower OpenGL requirements. This mode requires OpenGL 1.1. In compatibility mode the parameters 'object_index_persistence'"object_index_persistence", 'depth_persistence'"depth_persistence" and 'quality'"quality" are not used.

On Linux Remote Desktop 'disp_background'"disp_background" is not supported.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Scene3Dscene3Dscene_3d (input_control) scene_3d → (handle)HTuple (HHandle)HScene3D, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the 3D scene.

CameraIndexcameraIndexcamera_index (input_control) integer → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)Union[int, str]Htuple (char* / Hlong)

Index of the camera used to display the scene.

Result🔗

display_scene_3dDisplayScene3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

See also

create_scene_3dCreateScene3d, render_scene_3dRenderScene3d

Module🔗

3D Metrology