Unreal SDK  v1.2.0
Loading...
Searching...
No Matches
WeArtCommon.h File Reference
#include <vector>
#include <string>
#include "json.hpp"
Include dependency graph for WeArtCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GyroscopeData
 
struct  TofData
 
struct  SensorData
 
struct  MiddlewareConnectedDevice
 
struct  MiddlewareStatusData
 
struct  ThimbleStatus
 Status of a single thimble connected to a device. More...
 
struct  ConnectedDeviceStatus
 Status of a connected TouchDIVER device. More...
 

Namespaces

namespace  WeArtConstants
 

Enumerations

enum  EHandSide { Left = 1 << 0 UMETA(DisplayName = "Left") , Right = 1 << 1 UMETA(DisplayName = "Right") }
 
enum  HandClosingState { Open = 0 , Closing = 1 , Closed = 2 }
 
enum  GraspingState { Grabbed = 0 , Released = 1 }
 
enum class  MiddlewareStatus {
  DISCONNECTED , IDLE , STARTING , RUNNING ,
  STOPPING , UPLOADING_TEXTURES , CONNECTING_DEVICE , CALIBRATION
}
 
enum class  TextureType : uint8 {
  ClickNormal = 0 , ClickSoft = 1 , DoubleClick = 2 , AluminiumFineMeshSlow = 3 ,
  AluminiumFineMeshFast = 4 , PlasticMeshSlow = 5 , ProfiledAluminiumMeshMedium = 6 , ProfiledAluminiumMeshFast = 7 ,
  RhombAluminiumMeshMedium = 8 , TextileMeshMedium = 9 , CrushedRock = 10 , VenetianGranite = 11 ,
  SilverOak = 12 , LaminatedWood = 13 , ProfiledRubberSlow = 14 , VelcroHooks = 15 ,
  VelcroLoops = 16 , PlasticFoil2 = 17 , Leather = 18 , Cotton1 = 19 ,
  Aluminium = 20 , DoubleSidedTape = 21
}
 

Functions

 ENUM_RANGE_BY_VALUES (EHandSide, EHandSide::Left, EHandSide::Right)
 
 NLOHMANN_JSON_SERIALIZE_ENUM (EHandSide, { {EHandSide::Left, "LEFT"}, {EHandSide::Right, "RIGHT"}, }) enum EActuationPoint
 
 ENUM_RANGE_BY_VALUES (EActuationPoint, EActuationPoint::Thumb, EActuationPoint::Index, EActuationPoint::Middle, EActuationPoint::Palm)
 
 NLOHMANN_JSON_SERIALIZE_ENUM (EActuationPoint, { {EActuationPoint::Thumb, "THUMB"}, {EActuationPoint::Index, "INDEX"}, {EActuationPoint::Middle, "MIDDLE"}, {EActuationPoint::Palm, "PALM"}, }) enum class TrackingType
 
 NLOHMANN_JSON_SERIALIZE_ENUM (MiddlewareStatus, { {MiddlewareStatus::DISCONNECTED, "DISCONNECTED"}, {MiddlewareStatus::IDLE, "IDLE"}, {MiddlewareStatus::STARTING, "STARTING"}, {MiddlewareStatus::RUNNING, "RUNNING"}, {MiddlewareStatus::STOPPING, "STOPPING"}, {MiddlewareStatus::UPLOADING_TEXTURES, "UPLOADING_TEXTURES"}, {MiddlewareStatus::CONNECTING_DEVICE, "CONNECTING_DEVICE"}, {MiddlewareStatus::CALIBRATION, "CALIBRATION"}, }) struct AccelerometerData
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (MiddlewareStatusData, status, version, statusCode, errorDesc, actuationsEnabled, connectedDevices)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (ThimbleStatus, id, connected, statusCode, errorDesc)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (ConnectedDeviceStatus, macAddress, handSide, batteryLevel, charging, thimbles)
 

Variables

const std::string WeArtConstants::WEART_SDK_TYPE = "SdkUnreal"
 
const std::string WeArtConstants::WEART_SDK_VERSION = "1.1.0"
 
const std::string WeArtConstants::WEART_SDK_TRACK_TYPE = "TrackType1"
 
const float WeArtConstants::defaultTemperature = 0.5f
 
const float WeArtConstants::minTemperature = 0.0f
 
const float WeArtConstants::maxTemperature = 1.0f
 
const float WeArtConstants::defaultForce = 0.0f
 
const float WeArtConstants::minForce = 0.0f
 
const float WeArtConstants::maxForce = 1.0f
 
const float WeArtConstants::defaultClosure = 0.0f
 
const float WeArtConstants::minClosure = 0.0f
 
const float WeArtConstants::maxClosure = 1.0f
 
const float WeArtConstants::staticTextureVelocity = 0.5f
 
const int WeArtConstants::defaultTextureIndex = 0
 
const int WeArtConstants::minTextureIndex = 0
 
const int WeArtConstants::maxTextureIndex = 254
 
const int WeArtConstants::nullTextureIndex = 255
 
const float WeArtConstants::defaultTextureVelocity [3] = { 0.5f, 0.0f, 0.0f }
 
const float WeArtConstants::minTextureVelocity [3] = { 0.0f, 0.0f, 0.0f }
 
const float WeArtConstants::maxTextureVelocity [3] = { 1.0f, 1.0f, 1.0f }
 
const float WeArtConstants::defaultCollisionMultiplier = 20.0f
 
const float WeArtConstants::minCollisionMultiplier = 0.0f
 
const float WeArtConstants::maxCollisionMultiplier = 100.0f
 
const float WeArtConstants::defaultVolumeTexture = 100.0f
 
const float WeArtConstants::minVolumeTexture = 0.0f
 
const float WeArtConstants::maxVolumeTexture = 100.0f
 
const float WeArtConstants::thresholdThumbClosure = 0.5f
 
const float WeArtConstants::thresholdIndexClosure = 0.5f
 
const float WeArtConstants::thresholdMiddleClosure = 0.5f
 
const float WeArtConstants::defaultGraspForce = 0.3f
 
const float WeArtConstants::dynamicForceSensibility = 10.0f
 

Enumeration Type Documentation

◆ EHandSide

enum EHandSide
Enumerator
Left 
Right 

◆ GraspingState

Enumerator
Grabbed 
Released 

◆ HandClosingState

Enumerator
Open 
Closing 
Closed 

◆ MiddlewareStatus

enum class MiddlewareStatus
strong
Enumerator
DISCONNECTED 
IDLE 
STARTING 
RUNNING 
STOPPING 
UPLOADING_TEXTURES 
CONNECTING_DEVICE 
CALIBRATION 

◆ TextureType

enum class TextureType : uint8
strong
Enumerator
ClickNormal 
ClickSoft 
DoubleClick 
AluminiumFineMeshSlow 
AluminiumFineMeshFast 
PlasticMeshSlow 
ProfiledAluminiumMeshMedium 
ProfiledAluminiumMeshFast 
RhombAluminiumMeshMedium 
TextileMeshMedium 
CrushedRock 
VenetianGranite 
SilverOak 
LaminatedWood 
ProfiledRubberSlow 
VelcroHooks 
VelcroLoops 
PlasticFoil2 
Leather 
Cotton1 
Aluminium 
DoubleSidedTape 

Function Documentation

◆ ENUM_RANGE_BY_VALUES() [1/2]

ENUM_RANGE_BY_VALUES ( EActuationPoint  ,
EActuationPoint::Thumb  ,
EActuationPoint::Index  ,
EActuationPoint::Middle  ,
EActuationPoint::Palm   
)

◆ ENUM_RANGE_BY_VALUES() [2/2]

ENUM_RANGE_BY_VALUES ( EHandSide  ,
EHandSide::Left  ,
EHandSide::Right   
)

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [1/3]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( ConnectedDeviceStatus  ,
macAddress  ,
handSide  ,
batteryLevel  ,
charging  ,
thimbles   
)

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [2/3]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( MiddlewareStatusData  ,
status  ,
version  ,
statusCode  ,
errorDesc  ,
actuationsEnabled  ,
connectedDevices   
)

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [3/3]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( ThimbleStatus  ,
id  ,
connected  ,
statusCode  ,
errorDesc   
)

◆ NLOHMANN_JSON_SERIALIZE_ENUM() [1/3]

NLOHMANN_JSON_SERIALIZE_ENUM ( EActuationPoint  ,
{ {EActuationPoint::Thumb, "THUMB"}, {EActuationPoint::Index, "INDEX"}, {EActuationPoint::Middle, "MIDDLE"}, {EActuationPoint::Palm, "PALM"}, }   
)

< Deprecated, contains only closure values

< Tracking with closures, and abduction value for thumb

◆ NLOHMANN_JSON_SERIALIZE_ENUM() [2/3]

NLOHMANN_JSON_SERIALIZE_ENUM ( EHandSide  ,
{ {EHandSide::Left, "LEFT"}, {EHandSide::Right, "RIGHT"}, }   
)

◆ NLOHMANN_JSON_SERIALIZE_ENUM() [3/3]

NLOHMANN_JSON_SERIALIZE_ENUM ( MiddlewareStatus  ,
{ {MiddlewareStatus::DISCONNECTED, "DISCONNECTED"}, {MiddlewareStatus::IDLE, "IDLE"}, {MiddlewareStatus::STARTING, "STARTING"}, {MiddlewareStatus::RUNNING, "RUNNING"}, {MiddlewareStatus::STOPPING, "STOPPING"}, {MiddlewareStatus::UPLOADING_TEXTURES, "UPLOADING_TEXTURES"}, {MiddlewareStatus::CONNECTING_DEVICE, "CONNECTING_DEVICE"}, {MiddlewareStatus::CALIBRATION, "CALIBRATION"}, }   
)