Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::ViewportControllerInterface Class Referenceabstract

#include <ViewportControllerInterface.h>

Inherited by AzFramework::MultiViewportController< TViewportControllerInstance, Priority >, AzFramework::SingleViewportController, and AzFramework::ViewportControllerList.

Public Member Functions

virtual bool HandleInputChannelEvent (const ViewportControllerInputEvent &event)
 
virtual void ResetInputChannels ()
 
virtual void UpdateViewport (const ViewportControllerUpdateEvent &event)
 
virtual void RegisterViewportContext (ViewportId viewport)=0
 
virtual void UnregisterViewportContext (ViewportId viewport)=0
 
virtual ViewportControllerPriority GetPriority () const
 

Detailed Description

The interface for a Viewport Controller which handles input events and periodic updates for one or more registered Viewports.

See also
SingleViewportController for simple cases involving only one viewport.
MultiViewportController for cases involving multiple viewports with no shared state.

Member Function Documentation

◆ GetPriority()

virtual ViewportControllerPriority AzFramework::ViewportControllerInterface::GetPriority ( ) const
inlinevirtual

Gets the priority at which this controller will receive input events. If set to DispatchToAllPriorities, the controller will receive events multiple times for each available priority level. This typically is only needed in the case of a list of other viewport controllers, each with their own priority (handled by ViewportControllerList for most cases).

Reimplemented in AzFramework::MultiViewportController< TViewportControllerInstance, Priority >, and AzFramework::ViewportControllerList.

◆ HandleInputChannelEvent()

virtual bool AzFramework::ViewportControllerInterface::HandleInputChannelEvent ( const ViewportControllerInputEvent event)
inlinevirtual

Handles an input event dispatched to a given viewportContext.

Returns
A "handled" flag. If OnInputChannelEvent returns true, the event is considered handled and all further input handling in the containing ViewportControllerList halts.

Reimplemented in AzFramework::ViewportControllerList, and AzFramework::MultiViewportController< TViewportControllerInstance, Priority >.

◆ RegisterViewportContext()

virtual void AzFramework::ViewportControllerInterface::RegisterViewportContext ( ViewportId  viewport)
pure virtual

Registers a ViewportContext to be handled by this controller. The controller will receive OnInputChannelEvent and OnUpdateViewport notifications for the viewports.

Implemented in AzFramework::MultiViewportController< TViewportControllerInstance, Priority >, AzFramework::SingleViewportController, and AzFramework::ViewportControllerList.

◆ ResetInputChannels()

virtual void AzFramework::ViewportControllerInterface::ResetInputChannels ( )
inlinevirtual

Called to notify this controller that its input state should be reset. This is called when input events, such as key up events, may have been missed and it should be assumed that all input channels are in their default (i.e. no buttons pressed or other input provided) state.

Reimplemented in AzFramework::MultiViewportController< TViewportControllerInstance, Priority >, and AzFramework::ViewportControllerList.

◆ UnregisterViewportContext()

virtual void AzFramework::ViewportControllerInterface::UnregisterViewportContext ( ViewportId  viewport)
pure virtual

Unregisters a viewport from being handled by this controller. No further events will be received from this viewport after this is called.

Implemented in AzFramework::MultiViewportController< TViewportControllerInstance, Priority >, AzFramework::SingleViewportController, and AzFramework::ViewportControllerList.

◆ UpdateViewport()

virtual void AzFramework::ViewportControllerInterface::UpdateViewport ( const ViewportControllerUpdateEvent event)
inlinevirtual

Updates the current state of the viewport. This should be used to update e.g. the camera transform and will be called every frame for each registered viewport.

Reimplemented in AzFramework::ViewportControllerList, and AzFramework::MultiViewportController< TViewportControllerInstance, Priority >.


The documentation for this class was generated from the following file: