Vizard 8 » Command Index » Vizard modules » viz » <viz>.addGUICanvas
8.1

<viz>.addGUICanvas

Add a GUI canvas node to the scene

<viz>.addGUICanvas(  
parent = viz.WORLD  
scene = viz.MainScene  
)  
parent = viz.WORLD
viz.WORLD
viz.SCREEN
viz.ORTHO
<node3d> object
scene = viz.MainScene
If the parent is viz.WORLD or viz.SCREEN, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.

Remarks

A GUI canvas object is a container for GUI elements, and controls how they are rendered within the scene. The canvas can be configured to render to the screen or within the world.

The default render mode of the canvas is world overlay, with the following settings:

canvas.setRenderWorldOverlay([1280,720], fov=50.0, distance=3.0)

Return Value

<node3d:canvas> object

See also

<node3d:canvas>.setRenderScreenOrtho
<node3d:canvas>.setRenderScreenPerspective
<node3d:canvas>.setRenderWorld
<node3d:canvas>.setRenderWorldOverlay
<node3d:canvas>.setMouseStyle