#include <ViewportContextBus.h>
Inherited by AZ::RPI::ViewportContextManager.
Classes | |
struct | CreationParameters |
Parameters for creating a ViewportContext. More... | |
Public Member Functions | |
AZ_RTTI (ViewportContextRequestsInterface, "{FDB82F02-7021-433B-AAD3-25B97EC69962}") | |
virtual AZ::Name | GetDefaultViewportContextName () const =0 |
Gets the name of the default, primary ViewportContext, for common single-viewport scenarios. | |
virtual ViewportContextPtr | GetDefaultViewportContext () const =0 |
Get the ViewportConext which has default ViewportContext name. | |
virtual ViewportContextPtr | CreateViewportContext (const Name &contextName, const CreationParameters ¶ms)=0 |
virtual ViewportContextPtr | GetViewportContextByName (const Name &contextName) const =0 |
Gets the ViewportContext registered to the given name, if any. | |
virtual ViewportContextPtr | GetViewportContextById (AzFramework::ViewportId id) const =0 |
Gets the registered ViewportContext with the corresponding ID, if any. | |
virtual ViewportContextPtr | GetViewportContextByScene (const Scene *scene) const =0 |
virtual void | RenameViewportContext (ViewportContextPtr viewportContext, const Name &newContextName)=0 |
virtual void | EnumerateViewportContexts (AZStd::function< void(ViewportContextPtr)> visitorFunction)=0 |
Enumerates all registered ViewportContexts, calling visitorFunction once for each registered viewport. | |
virtual void | PushViewGroup (const Name &contextName, ViewGroupPtr viewGroup)=0 |
virtual bool | PopViewGroup (const Name &contextName, ViewGroupPtr viewGroup)=0 |
virtual ViewGroupPtr | GetCurrentViewGroup (const Name &contextName)=0 |
Manages ViewportContexts, which can be created and looked up by name. Contexts are mapped to a stack of default Views which can be used to push camera state to an arbitrary ViewportContext.
All methods are thread-safe, but the underlying ViewportContext may not be.
|
pure virtual |
Creates a ViewportContext and registers it by name. There may only be one context registered to a given name at any time. The ViewportContext will be automatically assigned a View from the stack registered to this context name. The ViewportContextManager does not take ownership of this ViewportContext, its lifecycle is the responsibility of the caller. ViewportContexts shall automatically unregister when they are destroyed.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Enumerates all registered ViewportContexts, calling visitorFunction once for each registered viewport.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Gets the view group currently registered to a given context, assuming the context exists. This will be null if there is no registered ViewportContext and no view groups have been pushed for this context name.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Get the ViewportConext which has default ViewportContext name.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Gets the name of the default, primary ViewportContext, for common single-viewport scenarios.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Gets the registered ViewportContext with the corresponding ID, if any.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Gets the ViewportContext registered to the given name, if any.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Gets the registered ViewportContext with matching RPI::Scene, if any. This function will return the first result.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Pops a view group off the stack for a given context name. A view group manages all stereoscopic and non-stereoscopic views. Returns true if the camera was successfully removed or false if the view wasn't removed, either because it wasn't found within any existing view groups or its removal was not allowed.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Pushes a view group to the stack for a given context name. A view group manages all stereoscopic and non-stereoscopic views. The Views within a View Group must be declared a camera by having the View::UsageFlags::UsageCamera usage flag set. This View Group will be registered as the context's pipeline's default view group until the top of the camera stack changes.
Implemented in AZ::RPI::ViewportContextManager.
|
pure virtual |
Maps a ViewportContext to a new name, inheriting the View stack (if any) registered to that context name. This can be used to switch "default" viewports by registering a viewport with the default ViewportContext name but note that only one ViewportContext can be mapped to a context name at a time.
Implemented in AZ::RPI::ViewportContextManager.