![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Manages a collection of views for a render surface, handling view creation, removal, ordering, and multi-viewport layouts. Each view combines a camera and viewport to control what portion of the scene is rendered and where it appears on screen. More...
Public Member Functions | |
| void | AddView (Rectangle targetRectPx, float zoom=1f, int zOrder=0, RectangleF? worldBoundsPx=null) |
| Creates and adds a new view with the specified screen rectangle, zoom level, and Z-order. The view is automatically configured with a camera that can be optionally clamped to world bounds. | |
| void | ConfigureSingleFullView (float zoom=1f, int zOrder=0) |
| Removes all existing views and creates a single full-screen view that occupies the entire logical Backbuffer. | |
| void | ConfigureVerticalSplit (float leftZoom=1f, float rightZoom=1f) |
| Removes all existing views and creates a vertical split-screen layout: left and right views sharing the full height of the render surface. | |
| void | ConfigureHorizontalSplit (float topZoom=1f, float bottomZoom=1f) |
| Removes all existing views and creates a horizontal split-screen layout: top and bottom views sharing the full width of the render surface. | |
| void | ClearViews () |
| Removes all views from the manager, unsubscribing from their events and marking the scene as needing a full refresh. | |
| IReadOnlyList< View > | GetViewsBelow (View view) |
| Returns all views that are rendered behind (below) the specified view, based on Z-order. Views with lower Z-order values appear behind. | |
| IReadOnlyList< View > | GetViewsAbove (View view) |
| Returns all views that are rendered in front of (above) the specified view, based on Z-order. Views with higher Z-order values appear in front. | |
Properties | |
| ReadOnlyCollection< View > | Views [get] |
| Gets a read-only collection of all views currently managed by this view manager. Views are sorted by Z-order, with lower values appearing first (drawn behind). | |
Events | |
| Action< View >? | ViewAdded |
| Occurs after a new View is added. | |
| Action< View >? | ViewRemoved |
| Occurs after a View is removed. | |
Manages a collection of views for a render surface, handling view creation, removal, ordering, and multi-viewport layouts. Each view combines a camera and viewport to control what portion of the scene is rendered and where it appears on screen.
Definition at line 13 of file ViewManager.cs.
| void Gondwana.Rendering.Views.ViewManager.AddView | ( | Rectangle | targetRectPx, |
| float | zoom = 1f, | ||
| int | zOrder = 0, | ||
| RectangleF? | worldBoundsPx = null ) |
Creates and adds a new view with the specified screen rectangle, zoom level, and Z-order. The view is automatically configured with a camera that can be optionally clamped to world bounds.
| targetRectPx | The screen-space rectangle (in pixels) where this view will be rendered on the render surface. |
| zoom | Initial zoom factor for the view. Values greater than 1 zoom in; values less than 1 zoom out. Default is 1 (no zoom). |
| zOrder | Draw order relative to other views. Lower values are drawn first (behind); higher values are drawn later (in front). Default is 0. |
| worldBoundsPx | Optional world-space bounds (in pixels) that limit where the camera can move. If null or RectangleF.Empty, the camera has no movement constraints. |
The newly created view's camera is initially positioned at world origin (0,0) and configured to snap to targets without smoothing. The view is automatically sorted by Z-order after being added.
Definition at line 70 of file ViewManager.cs.
| void Gondwana.Rendering.Views.ViewManager.ClearViews | ( | ) |
Removes all views from the manager, unsubscribing from their events and marking the scene as needing a full refresh.
This method cleanly detaches event handlers from each view's viewport before clearing the collection. After clearing, the scene is flagged for a full refresh to update the rendering state.
Definition at line 210 of file ViewManager.cs.
| void Gondwana.Rendering.Views.ViewManager.ConfigureHorizontalSplit | ( | float | topZoom = 1f, |
| float | bottomZoom = 1f ) |
Removes all existing views and creates a horizontal split-screen layout: top and bottom views sharing the full width of the render surface.
| topZoom | Initial zoom for the top view. |
| bottomZoom | Initial zoom for the bottom view. |
Definition at line 169 of file ViewManager.cs.
| void Gondwana.Rendering.Views.ViewManager.ConfigureSingleFullView | ( | float | zoom = 1f, |
| int | zOrder = 0 ) |
Removes all existing views and creates a single full-screen view that occupies the entire logical Backbuffer.
| zoom | Initial zoom level for the view. |
| zOrder | Z-order for the view (default 0). |
Definition at line 108 of file ViewManager.cs.
| void Gondwana.Rendering.Views.ViewManager.ConfigureVerticalSplit | ( | float | leftZoom = 1f, |
| float | rightZoom = 1f ) |
Removes all existing views and creates a vertical split-screen layout: left and right views sharing the full height of the render surface.
| leftZoom | Initial zoom for the left view. |
| rightZoom | Initial zoom for the right view. |
Definition at line 131 of file ViewManager.cs.
Returns all views that are rendered in front of (above) the specified view, based on Z-order. Views with higher Z-order values appear in front.
| view | The reference view to find views above. |
Definition at line 259 of file ViewManager.cs.
Returns all views that are rendered behind (below) the specified view, based on Z-order. Views with lower Z-order values appear behind.
| view | The reference view to find views below. |
Definition at line 237 of file ViewManager.cs.
|
get |
Gets a read-only collection of all views currently managed by this view manager. Views are sorted by Z-order, with lower values appearing first (drawn behind).
A ReadOnlyCollection<T> of View instances.
Definition at line 42 of file ViewManager.cs.
| Action<View>? Gondwana.Rendering.Views.ViewManager.ViewAdded |
Occurs after a new View is added.
Definition at line 21 of file ViewManager.cs.
| Action<View>? Gondwana.Rendering.Views.ViewManager.ViewRemoved |
Occurs after a View is removed.
Definition at line 26 of file ViewManager.cs.