Back to Aurora Vision Library website

You are here: Start » Function Reference » Debug Preview » CreateView3D

CreateView3D


Header: AVL.h
Namespace: avl::DebugPreview
Module: FoundationLite

Creates a new floating window for a 3D data preview.

Applications: This function is for development purpose only and requires Library Professional license.

Syntax

avl::DebugPreview::ViewHandle avl::DebugPreview::CreateView3D
(
	const atl::String& name,
	int width = -1,
	int height = -1,
	int posX = -1,
	int posY = -1,
	View3DWorldOrientation::Type worldOrientation = View3DWorldOrientation::RightHandZUp,
	View3DColoring::Type coloring = View3DColoring::ZScaleColoring,
	bool highQuality = true
)

Parameters

Name Type Default Description
name const String& Window title.
width int -1 Width of the window preview area in pixels.
height int -1 Height of the window preview area in pixels.
posX int -1 X coordinate of the initial window position.
posY int -1 Y coordinate of the initial window position.
worldOrientation View3DWorldOrientation::Type RightHandZUp Orientation of the 3D preview space.
coloring View3DColoring::Type ZScaleColoring Mode of the coloring of the point cloud points in the preview.
highQuality bool true Enables or disables high quality drawing in the preview.

Description

The debug preview system helps in debugging of Aurora Vision Library based applications by providing a quick but primitive way to preview internal application image-oriented data in floating windows.

This function initializes the preview subsystem and opens a new floating preview window for displaying 3D point clouds, surfaces and primitives. It is possible to open up to 32 preview windows at once (have up to 32 active preview handles). The user can interact with the preview by moving or resizing the window, zooming and rotating the preview content (with mouse and the mouse scroll-wheel) or setting the preview into various modes through the context menu (by right clicking the preview content).

The name function argument specifies the caption of the new window.

The width and height arguments specify the size of the preview content area of the window in pixels. The arguments are optional and can be omitted to use the default window size (the user can resize the window manually).

The posX and posY arguments specify the initial position of the upper left corner of the window in desktop coordinates. The arguments are optional and can be left on its default values (-1) to automatically arrange the preview window initial layout starting at the top left corner of the desktop.

The worldOrientation and coloring arguments specify the initial configuration of the 3D preview space. The arguments can be omitted (by default the preview is configured for right-hand coordinate system with z axis up, and for point cloud scale coloring along the z axis). The user can change this configuration manually through the context menu.

Setting the highQuality argument to true activates the anti-aliasing in the preview renderer (improves the view quality but requires more video resources and slows down the rendering).

A preview window will be closed as a result of the following actions:

  • the user manually closes the window (view handle remains valid),
  • CloseView is called on the view handle,
  • CloseAll is called.

This function creates a background thread with a message pump (single thread shared by all windows in the debug preview subsystem) that will stay active till the application closes (even when there are no more windows active). To explicitly close the debug preview subsystem and free its resources call the CloseAll function.

Return value

After successful execution this function returns a handle of the preview (of type avl::DebugPreview::ViewHandle). This handle can be used with the SetView3DPrimitive functions to set data into the preview, and with WaitForViewClose to wait for the user to close the window (to help with step-by-step debugging).

This handle needs to be explicitly released with CloseView or WaitForViewClose functions to release its resources (even when the user closes the window manually).

See Also

  • CloseView – Closes a floating preview window.