#include <InputMapping.h>
Inherits AzFramework::InputChannel.
Inherited by AzFramework::InputMappingAnd, and AzFramework::InputMappingOr.
Classes | |
class | ConfigBase |
Base class for input mapping configuration values that are exposed to the editor. More... | |
struct | EmptySnapshot |
Empty snapshot of an input channel used as the 'default' state for some input mappings. More... | |
struct | InputChannelNameFilteredByDeviceType |
Convenience class that allows for selection of an input channel name filtered by device. More... | |
Public Member Functions | |
AZ_CLASS_ALLOCATOR (InputMapping, AZ::SystemAllocator) | |
AZ_RTTI (InputMapping, "{37CA842F-F6E4-47CD-947A-C9B82A2A4DA2}", InputChannel) | |
InputMapping (const InputChannelId &inputChannelId, const InputContext &inputContext) | |
AZ_DISABLE_COPY_MOVE (InputMapping) | |
~InputMapping () override=default | |
Default Destructor. | |
bool | ProcessPotentialSourceInputEvent (const InputChannel &inputChannel) |
virtual void | OnTick () |
Tick/update the input mapping. | |
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 InputChannel * | GetInputChannel () const final |
AzFramework::InputChannelRequests::GetInputChannel | |
const InputChannelId & | GetInputChannelId () const |
const InputDevice & | GetInputDevice () const |
State | GetState () const |
bool | IsActive () const |
virtual float | GetValue () const |
virtual float | GetDelta () const |
virtual const CustomData * | GetCustomData () 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 |
Protected Types | |
using | SourceInputChannelIds = AZStd::unordered_set< InputChannelId > |
using | ActiveInputChannelIds = AZStd::unordered_map< InputChannelId, InputDeviceId > |
Protected Member Functions | |
virtual bool | IsSourceInput (const InputChannel &inputChannel)=0 |
virtual bool | OnSourceInputEvent (const InputChannel &inputChannel)=0 |
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) |
Base class for all input mappings that listen for 'raw' input and output custom input events. Derived classes should provide additional functions that allow their parent input context to update the state and value(s) of the input mapping as raw input is received from the system, and they can (optionally) override the virtual GetCustomData function to return custom data.
|
protected |
Alias for verbose container class
AzFramework::InputMapping::InputMapping | ( | const InputChannelId & | inputChannelId, |
const InputContext & | inputContext | ||
) |
Constructor
[in] | inputChannelId | Id of the input mapping |
[in] | inputContext | Input context that owns the input mapping |
|
protectedpure virtual |
Override to return whether an input channel is a source input for this input mapping.
[in] | inputChannel | The input channel that is a potential source input |
Implemented in AzFramework::InputMappingAnd, and AzFramework::InputMappingOr.
|
protectedpure virtual |
Override to be notified when a source input is active or its state or value is updated.
[in] | inputChannel | The input channel that is active or whose state or value updated |
Implemented in AzFramework::InputMappingAnd, and AzFramework::InputMappingOr.
bool AzFramework::InputMapping::ProcessPotentialSourceInputEvent | ( | const InputChannel & | inputChannel | ) |
Process a potential source input event, that will in turn call OnSourceInputEvent if the provided input channel is a source input for this input mapping.
[in] | inputChannel | The input channel that is a potential source input |