3Gear Systems SDK  v0.9.34
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
HandTrackingClient::BasicMessage Class Reference

#include <HandTrackingMessage.h>

Inheritance diagram for HandTrackingClient::BasicMessage:
HandTrackingClient::HandTrackingMessage HandTrackingClient::BimanualPinchMessage HandTrackingClient::PinchMessage HandTrackingClient::PoseMessage

Public Member Functions

MessageType getType () const
 
const HandStategetHandState (int hand) const
 Returns the overall general hand state, excluding fingers. More...
 
 BasicMessage (const MessageType type, const Vector3f &positionLeft, const Quaternionf &rotationLeft, const int clickCountLeft, const Vector3f &positionRight, const Quaternionf &rotationRight, const int clickCountRight)
 Constructs a BasicMessage. Should not generally be called by users of the API.
 
std::string serialize () const
 

Additional Inherited Members

- Public Types inherited from HandTrackingClient::HandTrackingMessage
enum  MessageType {
  WELCOME = 0, USER = 100, CALIBRATION = 101, POSE = 200,
  PRESSED = 300, DRAGGED = 301, RELEASED = 302, MOVED = 303,
  SIMULTANEOUSLY_PRESSED = 400, INDIVIDUALLY_PRESSED = 401, SIMULTANEOUSLY_RELEASED = 402, INDIVIDUALLY_RELEASED = 403,
  DRAGGED_BIMANUAL = 404, POINT = 500, INVALID_DATA = 10000
}
 
- Static Public Member Functions inherited from HandTrackingClient::HandTrackingMessage
static const char * messageTypeToString (MessageType m)
 Convert from a MessageType to its string representation; used for serialization.
 
static MessageType stringToMessageType (const std::string &str)
 Convert from a string to a MessageType; used in deserialization.
 
static HandTrackingMessagedeserialize (const std::string &data)
 Given a line of text sent over the network connection, converts it to a valid hand message. More...
 
- Protected Member Functions inherited from HandTrackingClient::HandTrackingMessage
 HandTrackingMessage ()
 

Detailed Description

The basic form of the message includes a type, which hand was updated, and the position and rotational frame of each hand.

Member Function Documentation

const HandState& HandTrackingClient::BasicMessage::getHandState ( int  hand) const
inline

Returns the overall general hand state, excluding fingers.

This is the most rigid, stable frame returned by the hand tracking and is probably the one you want to use for selection. It is defined by the position and rotation of the back of the hand (excluding the wrist).

MessageType HandTrackingClient::BasicMessage::getType ( ) const
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.

std::string HandTrackingClient::BasicMessage::serialize ( ) const
virtual

Serializes the message to a string, which could then be output over the network.

Implements HandTrackingClient::HandTrackingMessage.

Reimplemented in HandTrackingClient::PoseMessage, HandTrackingClient::BimanualPinchMessage, and HandTrackingClient::PinchMessage.


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