27#include "utility/event/hand_event.hpp"
29namespace utility::event
52 std::shared_ptr<Event>
create(
void)
const override;
58 std::shared_ptr<HandSqueezeEvent>
createTyped(
void)
const;
63 float _value { 0.0F };
66 float _force { 0.0F };
69 bool _isTouched {
false };
72 bool _isClicked {
false };
109 float getForce(
void)
const noexcept;
Abstract factory interface for creating events.
Abstract base class for hand events.
Factory for creating HandSqueezeEvent instances.
std::shared_ptr< Event > create(void) const override
Create a HandSqueezeEvent as base Event pointer.
std::shared_ptr< HandSqueezeEvent > createTyped(void) const
Create a strongly-typed HandSqueezeEvent.
HandSqueezeEvent & setValue(const float value) noexcept
Set squeeze value.
float getValue(void) const noexcept
Get squeeze value.
float getForce(void) const noexcept
Get squeeze force value.
HandSqueezeEvent & setButtonPressed(const bool clicked) noexcept
Set clicked state.
bool isTouched(void) const noexcept
Get touched state.
bool isButtonPressed(void) const noexcept
Get clicked state.
HandSqueezeEvent(void)
Default constructor.
HandSqueezeEvent & setTouched(const bool touched) noexcept
Set touched state.
~HandSqueezeEvent(void) override
Default destructor.
HandSqueezeEvent & setForce(const float force) noexcept
Set squeeze force value.