Represents the glove model, simulating actuator behavior on a given hand. More...
#include <GloveModel.h>
Public Member Functions | |
GloveModel (Hand hand, Actuator &actuator1, Actuator &actuator2, Actuator &actuator3) | |
Constructs a GloveModel object with the given hand and actuators. | |
void | resetAllActuators () |
Resets all actuators to their initial state. | |
void | executePatternAt (int index) |
Executes a pattern of actuations at the specified index in the pattern. | |
void | pauseBetweenLetters () |
Pauses between letters during a sequence of actuations. | |
void | activateOnNumber (int number) |
Activates the stimuli on a given number representing a specific actuator pattern. | |
void | setPattern (std::vector< int > newValues) |
Sets a new pattern of actuations to be played. | |
std::vector< int > | getPattern () |
Retrieves the current pattern of actuations. | |
int | getPatternLength () |
Returns the length of the current pattern. | |
void | setChordMode (ChordingScheme chordMode) |
Sets the chording mode for the glove, either sequential or OST encoding. | |
Represents the glove model, simulating actuator behavior on a given hand.
This class is used to simulate the actuations of actuators on a glove. It defines the pattern of actuations and the chording scheme (OST or sequential). The class also provides methods to control and reset actuators and manage the sequence of actuations.
|
inline |
Constructs a GloveModel object with the given hand and actuators.
Initializes the glove with actuators and assigns the specified hand (left or right).
hand | The hand (left or right) of the glove. |
actuator1 | First actuator of the glove. |
actuator2 | Second actuator of the glove. |
actuator3 | Third actuator of the glove. |
|
inline |
Activates the stimuli on a given number representing a specific actuator pattern.
The method activates and deactivates actuators based on the given number and the selected encoding scheme (OST or sequential).
number | The number representing the actuator pattern to be activated using the specific stimuli. |
|
inline |
Executes a pattern of actuations at the specified index in the pattern.
Resets all actuators and vibrates based on the pattern at the given index.
index | The index of the pattern to be executed. |
|
inline |
Retrieves the current pattern of actuations.
This method returns the current pattern of actuations that is set.
|
inline |
Returns the length of the current pattern.
|
inline |
Pauses between letters during a sequence of actuations.
This function applies a custom delay and resets all actuators after the delay.
|
inline |
Resets all actuators to their initial state.
This method deactivates all actuators, ensuring that they start in the same condition.
|
inline |
Sets the chording mode for the glove, either sequential or OST encoding.
This method selects the chording mode (either sequential or OST) for the actuations.
chordMode | The desired chording scheme (SEQUENTIAL_ENCODING or OST_ENCODING). |
|
inline |
Sets a new pattern of actuations to be played.
This method allows the user to define a new pattern of actuations.
newValues | A vector containing the new pattern of actuations. |