23#include "guillaume/components/hand_hover_interaction.hpp"
79 utility::graphic::SizeUI
82 return _accessibilityMargin;
86 const utility::graphic::SizeUI &margin)
88 if (_accessibilityMargin == margin) {
91 _accessibilityMargin = margin;
Whether an XR hand (controller) aims at an entity, what to call when the aim enters or leaves,...
HoverHandler getOnHoverHandler(void) const
Get the callback run when the hand ray enters the entity.
HandHoverInteraction & setAccessibilityMargin(const utility::graphic::SizeUI &margin)
Grow the hit area past the entity's bound without growing the entity on screen.
HandHoverInteraction & setOnUnhoverHandler(const UnhoverHandler &handler)
Store the callback run when the hand ray leaves the entity.
HandHoverInteraction & setHovered(bool isHovered)
Record whether a hand aims at the entity.
HandHoverInteraction & setOnHoverHandler(const HoverHandler &handler)
Store the callback run when the hand ray enters the entity.
std::function< void(void)> UnhoverHandler
Called on hover end.
UnhoverHandler getOnUnhoverHandler(void) const
Get the callback run when the hand ray leaves the entity.
HandHoverInteraction(void)
Construct a component that is not hovered, has no handler and no margin.
std::function< void(void)> HoverHandler
Called on hover start.
utility::graphic::SizeUI getAccessibilityMargin(void) const
Get the hit area added around the entity's bound.
bool isHovered(void) const
Check whether a hand aims at the entity.
Component(void)=default
Create a component that is not marked as changed.
void setHasChanged(bool hasChanged)
Raise or lower the changed flag.
State. Every class here is plain data attached to an entity.
The entity-component-system core, independent of any widget.