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::InputDeviceMouse::Implementation Class Referenceabstract

Base class for platform specific implementations of mouse input devices. More...

#include <InputDeviceMouse.h>

Inherited by AzFramework::XcbInputDeviceMouse.

Public Member Functions

 AZ_CLASS_ALLOCATOR (Implementation, AZ::SystemAllocator)
 
 Implementation (InputDeviceMouse &inputDevice)
 
 AZ_DISABLE_COPY_MOVE (Implementation)
 
virtual ~Implementation ()
 Destructor.
 
virtual bool IsConnected () const =0
 
virtual void SetSystemCursorState (SystemCursorState systemCursorState)=0
 
virtual SystemCursorState GetSystemCursorState () const =0
 
virtual void SetSystemCursorPositionNormalized (AZ::Vector2 positionNormalized)=0
 
virtual AZ::Vector2 GetSystemCursorPositionNormalized () const =0
 
virtual void TickInputDevice ()=0
 Tick/update the input device to broadcast all input events since the last frame.
 
void SetRawMovementSampleRate (AZ::u32 sampleRateHertz)
 

Static Public Member Functions

static ImplementationCreate (InputDeviceMouse &inputDevice)
 

Protected Types

using RawButtonEventQueueByIdMap = AZStd::unordered_map< InputChannelId, AZStd::vector< bool > >
 
using RawMovementEventQueueByIdMap = AZStd::unordered_map< InputChannelId, AZStd::vector< float > >
 

Protected Member Functions

void QueueRawButtonEvent (const InputChannelId &inputChannelId, bool rawButtonState)
 
void QueueRawMovementEvent (const InputChannelId &inputChannelId, float rawMovementDelta)
 
void ProcessRawEventQueues ()
 
void ResetInputChannelStates ()
 Reset the state of all this input device's associated input channels.
 

Detailed Description

Base class for platform specific implementations of mouse input devices.

Member Typedef Documentation

◆ RawButtonEventQueueByIdMap

using AzFramework::InputDeviceMouse::Implementation::RawButtonEventQueueByIdMap = AZStd::unordered_map<InputChannelId, AZStd::vector<bool> >
protected

Alias for verbose container class

Constructor & Destructor Documentation

◆ Implementation()

AzFramework::InputDeviceMouse::Implementation::Implementation ( InputDeviceMouse inputDevice)

Constructor

Parameters
[in]inputDeviceReference to the input device being implemented

Member Function Documentation

◆ Create()

static Implementation * AzFramework::InputDeviceMouse::Implementation::Create ( InputDeviceMouse inputDevice)
static

Default factory create function

Parameters
[in]inputDeviceReference to the input device being implemented

◆ GetSystemCursorPositionNormalized()

virtual AZ::Vector2 AzFramework::InputDeviceMouse::Implementation::GetSystemCursorPositionNormalized ( ) const
pure virtual

Get the current system cursor position normalized relative to the active window. The position obtained has had os ballistics applied, and is valid regardless of whether the system cursor is hidden or visible. When the cursor has been constrained to the active window the values will be in the [0.0, 1.0] range, but not when unconstrained. See also InputSystemCursorRequests::SetSystemCursorState and GetSystemCursorState.

Returns
The current system cursor position normalized relative to the active window

Implemented in AzFramework::XcbInputDeviceMouse.

◆ GetSystemCursorState()

virtual SystemCursorState AzFramework::InputDeviceMouse::Implementation::GetSystemCursorState ( ) const
pure virtual

Get the current state of the system cursor

Returns
The current state of the system cursor

Implemented in AzFramework::XcbInputDeviceMouse.

◆ IsConnected()

virtual bool AzFramework::InputDeviceMouse::Implementation::IsConnected ( ) const
pure virtual

Query the connected state of the input device

Returns
True if the input device is currently connected, false otherwise

Implemented in AzFramework::XcbInputDeviceMouse.

◆ ProcessRawEventQueues()

void AzFramework::InputDeviceMouse::Implementation::ProcessRawEventQueues ( )
protected

Process raw input events that have been queued since the last call to this function. This function is not thread safe, and so should only be called from the main thread.

◆ QueueRawButtonEvent()

void AzFramework::InputDeviceMouse::Implementation::QueueRawButtonEvent ( const InputChannelId inputChannelId,
bool  rawButtonState 
)
protected

Queue raw button events to be processed in the next call to ProcessRawEventQueues. This function is not thread safe and so should only be called from the main thread.

Parameters
[in]inputChannelIdThe input channel id
[in]rawButtonStateThe raw button state

◆ QueueRawMovementEvent()

void AzFramework::InputDeviceMouse::Implementation::QueueRawMovementEvent ( const InputChannelId inputChannelId,
float  rawMovementDelta 
)
protected

Queue raw movement events to be processed in the next call to ProcessRawEventQueues. This function is not thread safe and so should only be called from the main thread.

Parameters
[in]inputChannelIdThe input channel id
[in]rawMovementDeltaThe raw movement delta

◆ SetRawMovementSampleRate()

void AzFramework::InputDeviceMouse::Implementation::SetRawMovementSampleRate ( AZ::u32  sampleRateHertz)

Set the sample rate for raw mouse movement events

Parameters
[in]sampleRateHertzThe raw movement sample rate in Hertz (cycles per second)

◆ SetSystemCursorPositionNormalized()

virtual void AzFramework::InputDeviceMouse::Implementation::SetSystemCursorPositionNormalized ( AZ::Vector2  positionNormalized)
pure virtual

Attempt to set the system cursor position normalized relative to the active window

Parameters
[in]positionNormalizedThe desired system cursor position normalized

Implemented in AzFramework::XcbInputDeviceMouse.

◆ SetSystemCursorState()

virtual void AzFramework::InputDeviceMouse::Implementation::SetSystemCursorState ( SystemCursorState  systemCursorState)
pure virtual

Attempt to set the state of the system cursor

Parameters
[in]systemCursorStateThe desired system cursor state

Implemented in AzFramework::XcbInputDeviceMouse.

◆ TickInputDevice()

virtual void AzFramework::InputDeviceMouse::Implementation::TickInputDevice ( )
pure virtual

Tick/update the input device to broadcast all input events since the last frame.

Implemented in AzFramework::XcbInputDeviceMouse.


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