Vizard 8 » Command Index » Vizard objects » node3d » <node3d:canvas>.setRenderWorld
8.0

<node3d:canvas>.setRenderWorld

Render canvas within the world

<node3d:canvas>.setRenderWorld(  
resolution # [width, height]
size # [width, height]
scene = viz.MainScene  
)  
resolution
The virtual [width, height] resolution of the canvas.
size
The physical [width, height] size of the canvas in world coordinates. viz.AUTO_COMPUTE can be used with either the width or height to automatically compute the size to maintain aspect ratio with the resolution.
scene = viz.MainScene
The <scene> object to render within.

Remarks

This command will set the canvas to render within the world. You can think of it as a virtual computer monitor. The monitor has the specified pixel resolution and physical size dimensions.

This mode can be used to fix the GUI elements within the world, instead of attached to the view, as with <node3d:canvas>.setRenderWorldOverlay.

The mouse style will most likely need to be changed to viz.CANVAS_MOUSE_VIRTUAL or viz.CANVAS_MOUSE_VISIBLE, depending on the input device used. See <node3d:canvas>.setMouseStyle for more information.

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

None

See also

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