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

Message that indicates the progress of calibrating the user's hand scale. More...

#include <HandTrackingMessage.h>

Inheritance diagram for HandTrackingClient::CalibrationMessage:
HandTrackingClient::HandTrackingMessage

Public Member Functions

 CalibrationMessage (const float percentComplete, const float currentScale)
 Constructs a CalibrationMessage. Should not generally be called by users of the API.
 
float getPercentComplete () const
 
float getCurrentScale () const
 Contains the current hand scale; ranges between roughly 0.5 and 1.3.
 
MessageType getType () const
 
std::string serialize () const
 Serializes the message to send over the network. More...
 

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

Message that indicates the progress of calibrating the user's hand scale.

For the tracking to succeed, it is important to understand the overall size of the user's hands. In order to infer this quickly, we ask that new users spread their fingers out; calibrating then takes about a second. The CalibrationMessage provides a way for applications to provide feedback to the user about the state of the calibration process.

Member Function Documentation

float HandTrackingClient::CalibrationMessage::getPercentComplete ( ) const
inline

The percentage of completion of the calibration process. Ranges from 0 (no calibration active) to 1 (calibration complete).

MessageType HandTrackingClient::CalibrationMessage::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::CalibrationMessage::serialize ( ) const
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.


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