![]() |
3Gear Systems SDK
v0.9.34
|
Messages relating to simultaneous or individual pinching. More...
#include <HandTrackingMessage.h>
Public Member Functions | |
BimanualPinchMessage (const MessageType type, const Hand hand, const Vector3f &positionLeft, const Quaternionf &rotationLeft, const int clickCountLeft, const Vector3f &positionRight, const Quaternionf &rotationRight, const int clickCountRight) | |
Constructs a BimanualPinchMessage. Should not generally be called by users of the API. | |
const Hand | getHand () const |
std::string | serialize () const |
Additional Inherited Members |
Messages relating to simultaneous or individual pinching.
Bimanual pinch messages are a ``higher-level'' message than the regular pinch message, and can be used to distinguish whether one hand pinched or whether both pinched simultaneously. If the user presses both hands at the same time, for example, you will only get a single Bimanual SIMULTANEOUSLY_PRESSED message (instead of two PRESSED messages, as you would with the PinchMessage). The cost of this higher-level knowledge is a bit of additional lag: to determine whether two pinches happen at the same time we have to wait 100ms or so (since the pinches are never going to be exactly simultaneous). You can decide whether the added functionality is worth the lag and choose which of the two interfaces you prefer.
Note that we do not recommend responding to both the BimanualPinchMessage and the PinchMessage; applications should generally pick one or the other. Responding to both can lead to very confusing interactions (since most pinches will be detected at least twice).
To help understanding the difference between the PinchMessage and the BimanualPinchMessage, consider the following two scenarios:
First, suppose the user presses her left hand and then, a second later, her right hand. You will receive the following sequence of events:
Note how the BimanualPinchMessage always lags slightly behind the PinchMessage (you will receive it a couple frames later). Now, suppose the user presses her left and right hands simultaneously.
|
inline |
|
virtual |
Serializes the message to a string, which could then be output over the network.
Reimplemented from HandTrackingClient::BasicMessage.