|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Whether an XR hand pokes an entity (touches it with a finger), and what to call when it does. More...
#include <headers/guillaume/components/hand_poke_interaction.hpp>


Public Member Functions | |
| HandPokeInteraction (void) | |
| Construct a component that is not poked and has no handler. | |
| ~HandPokeInteraction (void)=default | |
| Default destructor. | |
| bool | isPoke (void) const |
| Check whether a hand pokes the entity. | |
| void | setPoking (bool poking) |
| Record whether a hand pokes the entity. | |
Whether an XR hand pokes an entity (touches it with a finger), and what to call when it does.
systems::HandPoke writes it in the Event phase. On each hand poke event it casts a ray from the poke pose along its forward direction and tests it against the entity's Transform and Bound: the poke flag becomes the result of that test, and the handler set with setOnEventHandler() is called when the ray hits. systems::Focus reads the flag to give the focus to the entity and systems::StyleState reads it as "pressed".
The handler runs for every poke event that hits the entity, not only for the first one. The flag only changes in a frame that received a poke event.
Definition at line 47 of file hand_poke_interaction.hpp.
| guillaume::components::HandPokeInteraction::HandPokeInteraction | ( | void | ) |
Construct a component that is not poked and has no handler.
Definition at line 27 of file hand_poke_interaction.cpp.
| bool guillaume::components::HandPokeInteraction::isPoke | ( | void | ) | const |
Check whether a hand pokes the entity.
Definition at line 33 of file hand_poke_interaction.cpp.
| void guillaume::components::HandPokeInteraction::setPoking | ( | bool | poking | ) |
Record whether a hand pokes the entity.
Called by systems::HandPoke; it calls no handler. Always marks the component changed, even when the flag is the same.
| poking | True when the ray of the poke event hits the entity. |
Definition at line 38 of file hand_poke_interaction.cpp.