Skip to main content

Shared Types

The SharedTypes.h file defines various enumerations and a structure within the Interhaptics::HapticBodyMapping namespace. These types are used to represent shared types and constants related to haptic body mapping.

Articles​

Operator​

This enumeration represents operators used in the haptic body mapping. The possible values are:

  • Minus: Represents a minus operator (-1)
  • Neutral: Represents a neutral operator (0)
  • Plus: Represents a plus operator (1)

LateralFlag​

This enumeration represents the lateral position of a body part. The possible values are:

  • Unknown_position: Represents an unknown position (-1)
  • Global: Represents the global position (0)
  • Right: Represents the right position (1)
  • Left: Represents the left position (2)
  • Center: Represents the center position (3)

GroupID​

The GroupID enumeration represents the group IDs for different body parts. Each group has a unique ID assigned to it for grouping purposes. The following are some of the groups and their corresponding IDs:

  • Unknown: Represents an unknown group. ID: -1
  • All: Represents all body parts. ID: 0
  • Top: Represents the top portion of the body. ID: 100
  • Down: Represents the lower portion of the body. ID: 101
  • Arm: Represents the arm group. ID: 200
  • Head: Represents the head group. ID: 201
  • Chest: Represents the chest group. ID: 202
  • Waist: Represents the waist group. ID: 203
  • Leg: Represents the leg group. ID: 204
  • Upper_arm: Represents the upper arm group. ID: 300
  • Lower_arm: Represents the lower arm group. ID: 301
  • Hand: Represents the hand group. ID: 302
  • Skull: Represents the skull group. ID: 303
  • Neck: Represents the neck group. ID: 304
  • Upper_leg: Represents the upper leg group. ID: 305
  • Lower_leg: Represents the lower leg group. ID: 306
  • Foot: Represents the foot group. ID: 307
  • Palm: Represents the palm group. ID: 400
  • Finger: Represents the finger group. ID: 401
  • Sole: Represents the sole group. ID: 402
  • Toe: Represents the toe group. ID: 403
  • Thumb: Represents the thumb group. ID: 500
  • Index: Represents the index finger group. ID: 501
  • Middle: Represents the middle finger group. ID: 502
  • Ring: Represents the ring finger group. ID: 503
  • Pinky: Represents the pinky finger group. ID: 504
  • Hallux: Represents the hallux group. ID: 505
  • Index_toe: Represents the index toe group. ID: 506
  • Middle_toe: Represents the middle toe group. ID: 507
  • Ring_toe: Represents the ring toe group. ID: 508
  • Pinky_toe: Represents the pinky toe group. ID: 509
  • First: Represents the first segment group. ID: 600
  • Second: Represents the second segment group. ID: 601
  • Third: Represents the third segment group. ID: 602

This enumeration consists of various group IDs that help categorize different body parts based on their grouping characteristics.

CommandData​

// recommended constructor
CommandData(Operator _sign, GroupID _group, LateralFlag _side = Global)
{
Sign = _sign;
Group = _group;
Side = _side;
}

This structure represents an instruction that is useful for finding the body part to render. It contains the following members:

  • Sign: Represents the sign of the operation (+/-) of type Operator.
  • Group: Represents the group targeted of type GroupID.
  • Side: Represents the side targeted of type LateralFlag.

The structure provides a recommended constructor to initialize the members.