Open matthewturk opened 5 months ago
We have the ability already to do display_bounds
. For instance:
import yt
import yt_idv
ds = yt.load_sample("IsolatedGalaxy")
rc = yt_idv.render_context(height=800, width=800, gui=True)
sg = rc.add_scene(ds, "density", no_ghost=True)
sg.components[0].display_bounds = (0.0, 0.5, 0.0, 0.5)
rc.run()
nicely puts our main display in the lower left. But, this doesn't have the ability to change the size, and it also still sends events to all the windows.
What I'd like to propose:
I think it might be out of spec to do much of anything with adding displays dynamically... But we can think about that.
One thing I'm thinking about here is that we generally have a single camera per scene object. So the notion of an active view is a little different because of that. We may want to separate out the camera into multiple objects, each of which is tied to a specific view of the scene.
Alright, here's what I think we should do. It might be too much, though.
Scene
, which becomes the mechanism by which access to SceneData
elements is handled, there are multiple View
objects. These contain Components
and Annotations
and a Camera
.render
method as well.pyimgui
interface, and select between them for which can receive events.View
object, with fallback in the Scene
.I need to think more about this, but this seems like how we'd need to go.
At the risk of commenting too quickly, it looks like upon closer inspection we could simply rename the bulk of what constitutes the SceneGraph
into a SceneView
.
It would be nice if we had an easier interface for a windowing system, whether that's built with imgui or not. This would make it much easier to do subset rendering (i.e., not rendering the volume that is covered by imgui!) and things like multiple views.