fresnel.interact#
Overview
View a fresnel Scene in real time. |
Details
Interactive Qt widgets.
- class fresnel.interact.SceneView(scene, max_samples=2000)#
View a fresnel Scene in real time.
SceneView
is a PySide2 widget that displays aScene
, rendering it withPath
interactively. Use the mouse to rotate the camera view.- Parameters:
Left click to pitch and yaw
Right click to roll and zoom
Middle click to pan
Hold ctrl to make small adjustments
Using in a standalone script
To use SceneView in a standalone script, import the
fresnel.interact
module, create aScene
, instantiate theSceneView
, show it, and start the app event loop.import fresnel, fresnel.interact # build scene view = fresnel.interact.SceneView(scene) view.show() fresnel.interact.app.exec_();
Using with Jupyter notebooks
To use SceneView in a Jupyter notebook, import PySide2.QtCore and activate Jupyter’s qt5 integration.
from PySide2 import QtCore % gui qt
Import the
fresnel.interact
module, create aScene
, and instantiate theSceneView
. Do not call the app event loop, Jupyter is already running the event loop in the background. When the SceneView object is the result of a cell, it will automatically show and activate focus.import fresnel, fresnel.interact # build Scene fresnel.interact.SceneView(scene)
Note
The interactive window will open on the system that hosts Jupyter.
- TIMEOUT = 100#
Timeout for delayed actions to take effect.