37 static_cast<uint16_t
>(
a) |
static_cast<uint16_t
>(
b));
48 return (
static_cast<uint16_t
>(set) &
static_cast<uint16_t
>(axis)) != 0U;
90 static constexpr size_t SLOT_COUNT = 12;
95 if (frame.size() <= STATE)
96 return TabletState::NONE;
97 return static_cast<TabletState>(
static_cast<uint32_t
>(frame[STATE]));
101 [[nodiscard]]
static bool in_state(std::span<const double> frame,
104 return (
static_cast<uint32_t
>(state_of(frame))
105 &
static_cast<uint32_t
>(bit))
constexpr TabletAxes & operator|=(TabletAxes &a, TabletAxes b) noexcept
TabletToolType
Physical tool type.
TabletState
State bits packed into the STATE slot.
TabletAxes
Axes a tool actually reports.
constexpr TabletAxes operator|(TabletAxes a, TabletAxes b) noexcept
constexpr bool has_axis(TabletAxes set, TabletAxes axis) noexcept
static bool in_state(std::span< const double > frame, TabletState bit) noexcept
Test a state bit on a frame.
static TabletState state_of(std::span< const double > frame) noexcept
Decode the state slot of a frame.
Slot indices into the double vector carried by a tablet InputValue.