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

◆ on_tick()

HookId MayaFlux::Nodes::Input::InputNode::on_tick ( const TypedHook< InputContext > &  callback)

Register callback for any input received.

Parameters
callbackFunction to call on every tick

The callback receives an InputContext with the current value and input details. Fires on every process_input() call, after smoothing is applied.

Definition at line 135 of file InputNode.cpp.

136{
137 return m_callbacks.add(adapt_hook(callback), callback.target_type());
138}
PickCallback callback
Definition Picker.cpp:22
HookId add(NodeHook hook, const std::type_info &key, uint8_t tag=0, std::array< double, 2 > params={})
Appends a hook with no duplicate check and returns its id.
HookList m_callbacks
Hooks fired on every tick.
Definition Node.hpp:478
NodeHook adapt_hook(const TypedHook< ContextT > &hook)
Wraps a context-typed hook into a NodeHook.

References MayaFlux::Nodes::adapt_hook(), MayaFlux::Nodes::HookList::add(), callback, and MayaFlux::Nodes::Node::m_callbacks.

+ Here is the call graph for this function: