MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ emit_frame()

void MayaFlux::Core::TabletBackend::emit_frame ( TabletDevice device)
private

Definition at line 834 of file TabletBackend.cpp.

835{
836 if (!m_running.load())
837 return;
838
839 InputValue value;
841 value.data = std::vector<double>(device.slots.begin(), device.slots.end());
842 value.timestamp_ns = static_cast<uint64_t>(
843 std::chrono::steady_clock::now().time_since_epoch().count());
844 value.device_id = device.inverted ? device.eraser_id : device.pen_id;
845 value.source_type = InputType::TABLET;
846
848
849 device.slots[TabletFrame::WHEEL] = 0.0;
850 device.slots[TabletFrame::WHEEL_CLICKS] = 0.0;
851}
float value
void notify_input(const InputValue &value)
@ TABLET
Digitizers and styluses (pressure, tilt, rotation)
@ VECTOR
Multiple float values (e.g., accelerometer xyz)
@ WHEEL_CLICKS
Integral detents this sample.
@ WHEEL
Degrees of wheel rotation this sample.

References MayaFlux::Core::TabletBackend::TabletDevice::eraser_id, MayaFlux::Core::TabletBackend::TabletDevice::inverted, m_running, notify_input(), MayaFlux::Core::TabletBackend::TabletDevice::pen_id, MayaFlux::Core::TabletBackend::TabletDevice::slots, MayaFlux::Core::TABLET, MayaFlux::Core::InputValue::type, value, MayaFlux::Core::InputValue::VECTOR, MayaFlux::Core::TabletFrame::WHEEL, and MayaFlux::Core::TabletFrame::WHEEL_CLICKS.

Referenced by unpack_report().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: