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

#include <InputChannelDigitalWithSharedModifierKeyStates.h>

Inherits AzFramework::InputChannelDigital.

Public Member Functions

 AZ_CLASS_ALLOCATOR (InputChannelDigitalWithSharedModifierKeyStates, AZ::SystemAllocator)
 
 AZ_RTTI (InputChannelDigitalWithSharedModifierKeyStates, "{DAA5C9F4-B833-4F3D-AED5-B8B87BB8FF72}", InputChannel)
 
 InputChannelDigitalWithSharedModifierKeyStates (const InputChannelId &inputChannelId, const InputDevice &inputDevice, SharedModifierKeyStates &sharedModifierKeyStates, ModifierKeyMask correspondingModifierKey=ModifierKeyMask::None)
 
 AZ_DISABLE_COPY_MOVE (InputChannelDigitalWithSharedModifierKeyStates)
 
virtual ~InputChannelDigitalWithSharedModifierKeyStates () override=default
 Default destructor.
 
const InputChannel::CustomDataGetCustomData () const override
 
void ResetState () override
 AzFramework::InputChannelRequests::ResetState
 
void ProcessRawInputEvent (bool rawValue)
 
- Public Member Functions inherited from AzFramework::InputChannelDigital
 AZ_CLASS_ALLOCATOR (InputChannelDigital, AZ::SystemAllocator)
 
 AZ_RTTI (InputChannelDigital, "{07BD463B-0E1C-47B5-849D-3C09F9D1B468}", InputChannel)
 
 InputChannelDigital (const InputChannelId &inputChannelId, const InputDevice &inputDevice)
 
 AZ_DISABLE_COPY_MOVE (InputChannelDigital)
 
 ~InputChannelDigital () override=default
 Default destructor.
 
float GetValue () const override
 
float GetDelta () const override
 
void SimulateRawInput (float rawValue) override
 AzFramework::InputChannelRequests::SimulateRawInput
 
void ProcessRawInputEvent (bool rawValue)
 
- Public Member Functions inherited from AzFramework::InputChannel
 AZ_CLASS_ALLOCATOR (InputChannel, AZ::SystemAllocator)
 
 AZ_RTTI (InputChannel, "{1C88625D-D297-4A1C-AE07-E17F88D138F3}")
 
 InputChannel (const InputChannelId &inputChannelId, const InputDevice &inputDevice)
 
 AZ_DISABLE_COPY_MOVE (InputChannel)
 
 ~InputChannel () override
 Destructor.
 
const InputChannelGetInputChannel () const final
 AzFramework::InputChannelRequests::GetInputChannel
 
const InputChannelIdGetInputChannelId () const
 
const InputDeviceGetInputDevice () const
 
State GetState () const
 
bool IsActive () const
 
template<class CustomDataType >
const CustomDataType * GetCustomData () const
 
bool UpdateState (bool isChannelActive)
 
void ResetState () override
 AzFramework::InputChannelRequests::ResetState
 
bool IsStateIdle () const
 
bool IsStateBegan () const
 
bool IsStateUpdated () const
 
bool IsStateEnded () const
 

Additional Inherited Members

- Public Types inherited from AzFramework::InputChannel
enum class  State { Idle , Began , Updated , Ended }
 State of the input channel (not all channels will go through all states) More...
 
using SharedPositionData2D = AZStd::shared_ptr< InputChannel::PositionData2D >
 Alias for verbose shared_ptr class.
 
- Static Public Member Functions inherited from AzFramework::InputChannel
static void Reflect (AZ::ReflectContext *context)
 

Detailed Description

Class for input channels that emit digital input values and a shared modifier key state. Examples: keyboard key

Constructor & Destructor Documentation

◆ InputChannelDigitalWithSharedModifierKeyStates()

AzFramework::InputChannelDigitalWithSharedModifierKeyStates::InputChannelDigitalWithSharedModifierKeyStates ( const InputChannelId inputChannelId,
const InputDevice inputDevice,
SharedModifierKeyStates sharedModifierKeyStates,
ModifierKeyMask  correspondingModifierKey = ModifierKeyMask::None 
)
explicit

Constructor

Parameters
[in]inputChannelIdId of the input channel being constructed
[in]inputDeviceInput device that owns the input channel
[in]sharedModifierKeyStatesThe shared modifier key states
[in]correspondingModifierKeyThe corresponding modifier key

Member Function Documentation

◆ GetCustomData()

const InputChannel::CustomData * AzFramework::InputChannelDigitalWithSharedModifierKeyStates::GetCustomData ( ) const
overridevirtual

Access to the shared modifier key state data associated with the input channel

Returns
Pointer to the modifier key state data

Reimplemented from AzFramework::InputChannel.

◆ ProcessRawInputEvent()

void AzFramework::InputChannelDigitalWithSharedModifierKeyStates::ProcessRawInputEvent ( bool  rawValue)

Process a raw input event, that will in turn update the channel's state based on whether it's active/engaged or inactive/idle, broadcasting an input event if the channel is left in a non-idle state. This function (or InputChannel::UpdateState) should only be called a max of once per channel per frame from InputDeviceRequests::TickInputDevice to ensure that input channels broadcast no more than one event each frame (and at the same time).

Note that this function hides InputChannelDigital::ProcessRawInputEvent which is intended.

Parameters
[in]rawValuesThe raw digital value to process

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