9#define MAX_AXIS_RANGE 85.0f
37 Direction direction, std::shared_ptr<ControlDeck> controlDeck =
nullptr);
Maps a physical input to a virtual analog stick direction.
Definition ControllerAxisDirectionMapping.h:27
virtual int8_t GetMappingType()
Returns the mapping type identifier (e.g. gamepad, keyboard).
uint8_t mPortIndex
Definition ControllerAxisDirectionMapping.h:79
virtual void EraseFromConfig()=0
Removes this mapping from the application configuration.
StickIndex mStickIndex
Definition ControllerAxisDirectionMapping.h:80
Direction mDirection
Definition ControllerAxisDirectionMapping.h:81
std::shared_ptr< ControlDeck > mControlDeck
Definition ControllerAxisDirectionMapping.h:82
std::shared_ptr< ControlDeck > GetControlDeck() const
Direction GetDirection()
Returns the direction this mapping represents.
void SetPortIndex(uint8_t portIndex)
Sets the controller port index for this mapping.
virtual void SaveToConfig()=0
Persists this mapping to the application configuration.
virtual ~ControllerAxisDirectionMapping()
virtual float GetNormalizedAxisDirectionValue()=0
Returns the current axis value normalised to [0, MAX_AXIS_RANGE].
ControllerAxisDirectionMapping(PhysicalDeviceType physicalDeviceType, uint8_t portIndex, StickIndex stickIndex, Direction direction, std::shared_ptr< ControlDeck > controlDeck=nullptr)
Constructs a ControllerAxisDirectionMapping.
virtual std::string GetAxisDirectionMappingId()=0
Returns a unique string identifier for this axis direction mapping.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
PhysicalDeviceType
Identifies the category of a physical input device.
Definition PhysicalDeviceType.h:11
Direction
Identifies the direction component of an axis mapping.
Definition ControllerAxisDirectionMapping.h:18
@ UP
Definition ControllerAxisDirectionMapping.h:18
@ LEFT
Definition ControllerAxisDirectionMapping.h:18
@ DOWN
Definition ControllerAxisDirectionMapping.h:18
@ RIGHT
Definition ControllerAxisDirectionMapping.h:18
StickIndex
Identifies which analog stick an axis mapping applies to.
Definition ControllerAxisDirectionMapping.h:15
@ RIGHT_STICK
Definition ControllerAxisDirectionMapping.h:15
@ LEFT_STICK
Definition ControllerAxisDirectionMapping.h:15