![]() |
3Gear Systems SDK
v0.9.34
|
Message that exposes the user name and skinning information for the user's calibrated hands. More...
#include <HandTrackingMessage.h>
Public Types | |
typedef std::array< int, 3 > | Triangle |
A triangle is just 3 ints (one for each vertex). | |
typedef std::vector< int > | IndicesVector |
typedef std::vector< float > | WeightsVector |
Public Member Functions | |
const std::string & | getUserProfileName () const |
The name of the user's profile. More... | |
const std::vector< Vector3f > & | getRestPositions (int hand) const |
The positions of the hand in its rest pose (with the bones given by getRestJointFrames). Indexed by JointFrameIndex. | |
const std::vector< Triangle > & | getTriangles (int hand) const |
The topology of the skinned hand mesh. Indexed by JointFrameIndex. | |
const std::vector < IndicesVector > & | getSkinningIndices (int hand) const |
Skinning indices for the hand. See getSkinningWeights for an example of how this is used. | |
const std::vector < WeightsVector > & | getSkinningWeights (int hand) const |
Skinning weights for the hand. More... | |
std::array< Matrix4f, N_JOINTS > | getRestJointFrames (int hand) const |
The joint frames of the hand in its rest pose (as Matrix4). | |
std::array< Transformf, N_JOINTS > | getRestJointTransforms (int hand) const |
The joint frames of the hand in its rest pose (as Transform). | |
UserMessage (const std::string &userProfileName, const std::array< std::vector< Vector3f >, N_HANDS > &restPositions, const std::array< std::vector< Triangle >, N_HANDS > &triangles, const std::array< std::vector< IndicesVector >, N_HANDS > &skinningIndices, const std::array< std::vector< WeightsVector >, N_HANDS > &skinningWeights, const std::array< std::array< Quaternionf, N_JOINTS >, N_HANDS > &restJointRotations, const std::array< std::array< Vector3f, N_JOINTS >, N_HANDS > &restJointTranslations) | |
Constructs a UserMessage. Should not generally be called by users of the API. | |
MessageType | getType () const |
std::string | serialize () const |
Serializes the message to send over the network. More... | |
Additional Inherited Members |
Message that exposes the user name and skinning information for the user's calibrated hands.
This message will be sent every time the user profile changes. This will happen every time a new client connects, but also if the scale of the user's hands appears to change.
You can use this data to display an active cursor of the user's hand. For client applications, however, we have moved away from displaying the whole skinned hand (which can be distracting) in favor of more abstract cursors.
The skinning used by our system is "Linear blend skinning" also known as "Smooth skinning."
|
inline |
Skinning weights for the hand.
Given a UserMessage and a JointMessage, here is how to generate a skinned hand model (using linear blend skinning):
|
inlinevirtual |
Returns the message type (e.g. PRESSED or DRAGGED). The message type is useful for distinguishing between similar messages, e.g., between PRESSED and RELEASED, which are both PinchMessages.
Implements HandTrackingClient::HandTrackingMessage.
|
inline |
The name of the user's profile.
In older versions of the software, we required each user to set up a unique profile that captured various parameters of his/her hand. Although this is officially still supported, we're moving away from this model, meaning that more often than not the profile will be "GenericProfile" more often than not.
|
virtual |
Serializes the message to send over the network.
Developers should not need to worry about this function unless they write their own networking code.
Implements HandTrackingClient::HandTrackingMessage.