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::ViewportControllerList Class Referencefinal

#include <ViewportControllerList.h>

Inherits AzFramework::ViewportControllerInterface.

Public Member Functions

void Add (ViewportControllerPtr controller)
 
void Remove (ViewportControllerPtr controller)
 Removes a controller from this list.
 
bool HandleInputChannelEvent (const AzFramework::ViewportControllerInputEvent &event) override
 
void ResetInputChannels () override
 
void UpdateViewport (const AzFramework::ViewportControllerUpdateEvent &event) override
 
void RegisterViewportContext (ViewportId viewport) override
 
void UnregisterViewportContext (ViewportId viewport) override
 Unregisters a Viewport from this list and all associated controllers.
 
AzFramework::ViewportControllerPriority GetPriority () const override
 
bool IsEnabled () const
 
void SetEnabled (bool enabled)
 
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

A list of ViewportControllers that allows priority-ordered dispatch to controllers registered to it. ViewportControllerList itself is-a controller, meaning it controllers can be contained in nested lists.

Member Function Documentation

◆ Add()

void AzFramework::ViewportControllerList::Add ( ViewportControllerPtr  controller)

Adds a controller to this list at the specified priority. This controller will be notified of all InputChannelEvents not consumed by a higher priority controller via OnInputChannelEvent.

◆ GetPriority()

AzFramework::ViewportControllerPriority AzFramework::ViewportControllerList::GetPriority ( ) const
inlineoverridevirtual

All ViewportControllerLists have a priority of Custom to ensure that they receive events at all priorities from any parent controllers.

Reimplemented from AzFramework::ViewportControllerInterface.

◆ HandleInputChannelEvent()

bool AzFramework::ViewportControllerList::HandleInputChannelEvent ( const AzFramework::ViewportControllerInputEvent event)
overridevirtual

Dispatches an InputChannelEvent to all controllers registered to this list until either a controller returns true to consume the event in OnInputChannelEvent or the controller list is exhausted. InputChannelEvents are sent to controllers in priority order (from the lowest priority value to the highest).

Reimplemented from AzFramework::ViewportControllerInterface.

◆ IsEnabled()

bool AzFramework::ViewportControllerList::IsEnabled ( ) const

Returns true if this controller list is enabled, i.e. it is accepting and forwarding input and update events to its children.

◆ RegisterViewportContext()

void AzFramework::ViewportControllerList::RegisterViewportContext ( ViewportId  viewport)
overridevirtual

Registers a Viewport to this list. All current and added controllers will be registered with this viewport.

Implements AzFramework::ViewportControllerInterface.

◆ ResetInputChannels()

void AzFramework::ViewportControllerList::ResetInputChannels ( )
overridevirtual

Dispatches a ResetInputChannels call to all controllers registered to this list. Calls to controllers are made in an undefined order.

Reimplemented from AzFramework::ViewportControllerInterface.

◆ SetEnabled()

void AzFramework::ViewportControllerList::SetEnabled ( bool  enabled)

Set this controller list's enabled state. If a controller list is disabled, it will ignore all input and update events rather than dispatching them to its children.

◆ UnregisterViewportContext()

void AzFramework::ViewportControllerList::UnregisterViewportContext ( ViewportId  viewport)
overridevirtual

Unregisters a Viewport from this list and all associated controllers.

Implements AzFramework::ViewportControllerInterface.

◆ UpdateViewport()

void AzFramework::ViewportControllerList::UpdateViewport ( const AzFramework::ViewportControllerUpdateEvent event)
overridevirtual

Dispatches an update tick to all controllers registered to this list. This occurs in reverse priority order (i.e. from the highest priority value to the lowest) so that controllers with the highest registration priority may override the transforms of the controllers with the lowest registration priority.

Reimplemented from AzFramework::ViewportControllerInterface.


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