utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::event::HandHapticEvent Class Reference

Shared behavior for hand haptic output events. More...

#include <headers/utility/event/hand_haptic_event.hpp>

Inheritance diagram for utility::event::HandHapticEvent:
Collaboration diagram for utility::event::HandHapticEvent:

Classes

class  Factory
 Factory for creating HandHapticEvent instances. More...
 

Public Member Functions

 HandHapticEvent (void)
 Default constructor.
 
 ~HandHapticEvent (void) override
 Default destructor.
 
HandHapticEventsetAmplitude (const float amplitude) noexcept
 Set haptic amplitude.
 
float getAmplitude (void) const noexcept
 Get haptic amplitude.
 
HandHapticEventsetFrequency (const float frequency) noexcept
 Set the frequency of the vibration in Hz.
 
float getFrequency (void) const noexcept
 Get the frequency of the vibration in Hz.
 
HandHapticEventsetDuration (const std::int64_t duration) noexcept
 Set the number of nanoseconds the vibration should last.
 
std::int64_t getDuration (void) const noexcept
 Get the number of nanoseconds the vibration should last.
 
HandHapticEventsetFrequencyHz (const float frequencyHz) noexcept
 Backward-compatible alias for setFrequency.
 
float getFrequencyHz (void) const noexcept
 Backward-compatible alias for getFrequency.
 
HandHapticEventsetDurationNs (const std::int64_t durationNs) noexcept
 Backward-compatible alias for setDuration.
 
std::int64_t getDurationNs (void) const noexcept
 Backward-compatible alias for getDuration.
 
- Public Member Functions inherited from utility::event::HandEvent
 HandEvent (void)
 Default constructor.
 
virtual ~HandEvent (void) override
 Default destructor.
 
HandEventsetHandType (const HandType handType) noexcept
 Set the type of hand involved in the event.
 
HandType getHandType (void) const noexcept
 Get the type of hand involved in the event.
 
HandEventsetPose (const graphic::PoseF &pose) noexcept
 Set the pose of the hand.
 
graphic::PoseF getPose (void) const noexcept
 Get the pose of the hand.
 
HandEventsetAim (const graphic::PoseF &aim) noexcept
 Set aim pose.
 
graphic::PoseF getAim (void) const noexcept
 Get aim pose.
 
HandEventsetGrip (const graphic::PoseF &grip) noexcept
 Set grip pose.
 
graphic::PoseF getGrip (void) const noexcept
 Get grip pose.
 
HandEventsetGripSurface (const graphic::PoseF &gripSurface) noexcept
 Set grip_surface pose.
 
graphic::PoseF getGripSurface (void) const noexcept
 Get grip_surface pose.
 
- Public Member Functions inherited from utility::event::Event
 Event (void)=default
 Default constructor.
 
virtual ~Event (void)=default
 Virtual destructor.
 

Additional Inherited Members

- Public Types inherited from utility::event::HandEvent
enum class  HandType { Unknown = 0 , Left = 1 , Right = 2 }
 Hand types for hand events. Defines the type of hand involved in the event (e.g., left or right). More...
 

Detailed Description

Shared behavior for hand haptic output events.

Definition at line 36 of file hand_haptic_event.hpp.

Member Function Documentation

◆ getAmplitude()

float utility::event::HandHapticEvent::getAmplitude ( void  ) const
noexcept

Get haptic amplitude.

Returns
Amplitude in [0, 1].

Definition at line 56 of file hand_haptic_event.cpp.

◆ getDuration()

std::int64_t utility::event::HandHapticEvent::getDuration ( void  ) const
noexcept

Get the number of nanoseconds the vibration should last.

Returns
Duration in nanoseconds.

Definition at line 80 of file hand_haptic_event.cpp.

Here is the caller graph for this function:

◆ getDurationNs()

std::int64_t utility::event::HandHapticEvent::getDurationNs ( void  ) const
noexcept

Backward-compatible alias for getDuration.

Returns
Duration in nanoseconds.

Definition at line 102 of file hand_haptic_event.cpp.

Here is the call graph for this function:

◆ getFrequency()

float utility::event::HandHapticEvent::getFrequency ( void  ) const
noexcept

Get the frequency of the vibration in Hz.

Returns
Frequency in Hz.

Definition at line 68 of file hand_haptic_event.cpp.

Here is the caller graph for this function:

◆ getFrequencyHz()

float utility::event::HandHapticEvent::getFrequencyHz ( void  ) const
noexcept

Backward-compatible alias for getFrequency.

Returns
Frequency in Hz.

Definition at line 91 of file hand_haptic_event.cpp.

Here is the call graph for this function:

◆ setAmplitude()

HandHapticEvent & utility::event::HandHapticEvent::setAmplitude ( const float  amplitude)
noexcept

Set haptic amplitude.

Parameters
amplitudeAmplitude in [0, 1].
Returns
Reference to this event.

Definition at line 50 of file hand_haptic_event.cpp.

◆ setDuration()

HandHapticEvent & utility::event::HandHapticEvent::setDuration ( const std::int64_t  duration)
noexcept

Set the number of nanoseconds the vibration should last.

Parameters
durationDuration in nanoseconds.
Returns
Reference to this event.

Definition at line 74 of file hand_haptic_event.cpp.

Here is the caller graph for this function:

◆ setDurationNs()

HandHapticEvent & utility::event::HandHapticEvent::setDurationNs ( const std::int64_t  durationNs)
noexcept

Backward-compatible alias for setDuration.

Parameters
durationNsDuration in nanoseconds.
Returns
Reference to this event.

Definition at line 97 of file hand_haptic_event.cpp.

Here is the call graph for this function:

◆ setFrequency()

HandHapticEvent & utility::event::HandHapticEvent::setFrequency ( const float  frequency)
noexcept

Set the frequency of the vibration in Hz.

Parameters
frequencyFrequency in Hz.
Returns
Reference to this event.

Definition at line 62 of file hand_haptic_event.cpp.

Here is the caller graph for this function:

◆ setFrequencyHz()

HandHapticEvent & utility::event::HandHapticEvent::setFrequencyHz ( const float  frequencyHz)
noexcept

Backward-compatible alias for setFrequency.

Parameters
frequencyHzFrequency in Hz.
Returns
Reference to this event.

Definition at line 86 of file hand_haptic_event.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: