MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
HIDAxisNode Class Reference

InputNode for joystick/gamepad axes with deadzone. More...

#include <HIDNode.hpp>

+ Collaboration diagram for HIDAxisNode:

Detailed Description

InputNode for joystick/gamepad axes with deadzone.

Examples

// Clean, expressive usage
auto stick_x = std::make_shared<HIDNode>(HIDConfig::axis(0, 2, true)
.with_deadzone(0.1)
.with_range(-32768, 32767));
auto trigger = std::make_shared<HIDNode>(HIDConfig::axis(4, 1)
.with_range(0, 255));
auto button_a = std::make_shared<HIDNode>(HIDConfig::button(6, 0x01));
auto custom = std::make_shared<HIDNode>(HIDConfig::custom(
[](auto bytes) { return complex_parsing_logic(bytes); }
));

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