Open 3D Engine AtomLyIntegration Gem 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.
AZ::Render::EditorStateBase Class Referenceabstract

#include <EditorStateBase.h>

Inherits EditorStateRequestsBus::Handler.

Inherited by AZ::Render::FocusedEntityState, and AZ::Render::SelectedEntityState.

Public Member Functions

 EditorStateBase (EditorState editorState, const AZStd::string &stateName, const PassNameList &childPassNameList, const AZStd::string &maskDrawList)
 
 EditorStateBase (EditorState editorState, const AZStd::string &stateName, const PassNameList &childPassNameList)
 Delegate constructor for editor state parents that use the default entity mask.
 
virtual AzToolsFramework::EntityIdList GetMaskedEntities () const =0
 Returns the entities that should be rendered to the entity mask for this editor state.
 
const AZStd::string & GetStateName () const
 Returns the name of this editor state.
 
const Name & GetEntityMaskDrawList () const
 Returns the name of the entity mask draw list used this editor state.
 
const PassNameList & GetChildPassNameList () const
 
virtual bool IsEnabled () const
 Returns true of this editor mode state is to be enabled, otherwise false.
 
Name GetPassTemplateName () const
 Returns the pass template name for this editor state effect pass.
 
Name GetPassName () const
 Returns the pass name of this editor state effect pass.
 
void AddParentPassForPipeline (const Name &pipelineName, RPI::Ptr< RPI::Pass > parentPass)
 Adds the pass class pointer for this pass for the specified pipeline.
 
void RemoveParentPassForPipeline (const Name &pipelineName)
 Removes the pass class pointer for this pass for the specified pipeline.
 
void UpdatePassDataForPipelines ()
 Calls the update method for each pipeline this editor state effect pass is part of.
 
void SetEnabled (bool enabled) override
 
Name GetGeneratedChildPassName (size_t index) const
 Returns the generated name for the specified child pass.
 

Protected Member Functions

template<class ChildPass >
ChildPass * FindChildPass (RPI::ParentPass *parentPass, size_t index) const
 Helper function for finding the specified child effect pass for this editor state effect pass.
 
virtual void UpdatePassData (RPI::ParentPass *)
 Opportunity for the editor mode state to initialize any child pass object state.
 

Detailed Description

Parent pass for editor states. This base class is inherited by the specific editor states that wish to implement custom feedback effects. When a child class of this base class is constructed, the render passes in the pass descriptor list are constructed and added to the render pipeline. The ordering of the corresponding parent passes in the render pipeline for these passes is determined by the order in which they are added to the editor mode pass system (first in, first rendered) but it is the responsibility of the child classes themselves to enable and disable themselves as per the editor state, as well as handling their own mutal exclusivity (if any).

Constructor & Destructor Documentation

◆ EditorStateBase()

AZ::Render::EditorStateBase::EditorStateBase ( EditorState  editorState,
const AZStd::string &  stateName,
const PassNameList &  childPassNameList,
const AZStd::string &  maskDrawList 
)

Constructs the editor state effect pass with the specified pass chain and mask draw list and connects it to the tick bus.

Parameters
editorStateThe editor state enumeration to associate with this pass.
stateNameName for this editor mode stat.
passNameListList of child passes to create, in order of appearance.
maskDrawListThe entity mask to use for this state.

Member Function Documentation

◆ GetChildPassNameList()

const PassNameList & AZ::Render::EditorStateBase::GetChildPassNameList ( ) const

Returns the child pass descriptor list for this editor mode state (used by the pass system to construct and configure the child passes state and routing).

◆ GetMaskedEntities()

virtual AzToolsFramework::EntityIdList AZ::Render::EditorStateBase::GetMaskedEntities ( ) const
pure virtual

Returns the entities that should be rendered to the entity mask for this editor state.

Implemented in AZ::Render::FocusedEntityState, and AZ::Render::SelectedEntityState.

◆ IsEnabled()

virtual bool AZ::Render::EditorStateBase::IsEnabled ( ) const
inlinevirtual

Returns true of this editor mode state is to be enabled, otherwise false.

Reimplemented in AZ::Render::FocusedEntityState.

◆ UpdatePassData()

virtual void AZ::Render::EditorStateBase::UpdatePassData ( RPI::ParentPass *  )
inlineprotectedvirtual

Opportunity for the editor mode state to initialize any child pass object state.

Reimplemented in AZ::Render::SelectedEntityState.


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