#include <InputChannelAxis3D.h>
Inherits AzFramework::InputChannel.
Classes | |
struct | AxisData3D |
Custom data struct for three dimensional axis data. More... | |
Public Member Functions | |
AZ_CLASS_ALLOCATOR (InputChannelAxis3D, AZ::SystemAllocator) | |
AZ_RTTI (InputChannelAxis3D, "{40CE7BF6-12C3-4B88-AEB7-B3D63E686650}", InputChannel) | |
InputChannelAxis3D (const InputChannelId &inputChannelId, const InputDevice &inputDevice) | |
AZ_DISABLE_COPY_MOVE (InputChannelAxis3D) | |
~InputChannelAxis3D () override=default | |
Default destructor. | |
float | GetValue () const override |
float | GetDelta () const override |
const InputChannel::CustomData * | GetCustomData () const override |
void | ResetState () override |
AzFramework::InputChannelRequests::ResetState | |
void | SimulateRawInput3D (float rawValueX, float rawValueY, float rawValueZ) override |
AzFramework::InputChannelRequests::SimulateRawInput3D | |
void | ProcessRawInputEvent (const AZ::Vector3 &rawValues) |
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 |
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) |
Class for input channels that emit three dimensional axis input values. Example: motion sensor data (acceleration, rotation, or magnetic field)
|
explicit |
Constructor
[in] | inputChannelId | Id of the input channel being constructed |
[in] | inputDevice | Input device that owns the input channel |
|
overridevirtual |
Access to the three dimensional axis data associated with the input channel
Reimplemented from AzFramework::InputChannel.
|
overridevirtual |
Access to the total distance moved since last frame
Reimplemented from AzFramework::InputChannel.
|
overridevirtual |
Access to the distance from the origin (length of the vector formed by the axis values)
Reimplemented from AzFramework::InputChannel.
void AzFramework::InputChannelAxis3D::ProcessRawInputEvent | ( | const AZ::Vector3 & | rawValues | ) |
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).
[in] | rawValues | The raw axis values to process |