public sealed class ViewportLayoutSeveral scene panes, each with its own camera and its own way of drawing.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A pane is a whole SceneViewport, not a camera. Doc 11 asks for "multiple simultaneous viewports with independent cameras and render modes", and the second half of that is what forces it: a render mode is stage state and a RenderStage belongs to the render system, so a pane that wanted its own mode needs its own stage as well as its own view. Sharing anything less than the whole pane makes the second pane silently change the first.
The quad layout's three orthographic panes are set up once, on creation. Top, front and side with an orthographic projection is what everybody means by a four-pane layout, and a layout that came up as four identical perspective views is one that every user then configures by hand.
⚠ Only the focused pane is driven by the keyboard. Two panes both taking WASD would fly both cameras, and a viewport is focusable precisely so that "which one" has an answer.
Fields and properties (5)
public IReadOnlyList<SceneViewport> PanesThe panes, in reading order.
public SceneViewport? FocusedWhich pane the keyboard drives, or when none has focus.
public ViewportArrangement ArrangementHow the panes are arranged.
public EditorDocument? DocumentWhere a gizmo drag in any pane is recorded.
public Func<IReadOnlyList<IGizmoTarget>>? TargetsFactoryTurns the shared selection into things a gizmo can move.
Events (1)
public Action<ViewportLayout>? RearrangedRaised whenever the number of panes changes.
Methods (4)
public ViewportLayout(UiElement root, Selection<Entity> selection)Builds a layout inside an element.
public IReadOnlyList<RenderView> Update(TimeSpan delta)Advances every pane and brings its render view up to date.
public void Focus(SceneViewport? pane)Says which pane the keyboard drives.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (1)
- EditorApplicationVixen.Editor.App