23#include "utility/event/hand_squeeze_event.hpp"
25#include "utility/math/common.hpp"
27namespace utility::event
30 HandSqueezeEvent::Factory::~Factory(
void) =
default;
34 return std::make_unique<HandSqueezeEvent>();
37 std::shared_ptr<HandSqueezeEvent>
40 return std::make_unique<HandSqueezeEvent>();
49 _value = utility::math::clamp(value, 0.0F, 1.0F);
60 _force = utility::math::clamp(force, 0.0F, 1.0F);
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.