diff --git a/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp b/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp index 52244acc..9738c01a 100644 --- a/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp +++ b/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp @@ -47,6 +47,7 @@ #include "SGInterop/SGIC_ESGDeviceType.h" #include "SGInterop/SGIC_ESGFinger.h" #include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_ESGSenseGloveThumperCommand.h" #include "SGInterop/SGIC_FQuat.h" #include "SGInterop/SGIC_FSGBasicHandModelImpl.h" #include "SGInterop/SGIC_FSGBuzzCommandImpl.h" @@ -692,13 +693,50 @@ bool USGSenseGlove::GetHandPose(UObject* Outer, const USGHandProfile* HandProfil return bResult; } +bool USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand, + ESGSenseGloveThumperCommand ThumperCommand) +{ + SyncImplObject(); + + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{ + ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get() + }; + FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{ + BuzzCommand->ToBuzzCommandImpl().Get() + }; + FSGIC_ESGSenseGloveThumperCommand ThumperCommandContainer{ThumperCommand}; + const bool bResult = + SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ESenseGloveThumperCommand( + &InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer, &ThumperCommandContainer); + + SyncUProperties(); + + return bResult; +} + +bool USGSenseGlove::SendHaptics(ESGSenseGloveThumperCommand ThumperCommand) +{ + SyncImplObject(); + + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_ESGSenseGloveThumperCommand ThumperCommandContainer{ThumperCommand}; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ThumperCommand( + &InstanceContainer, &ThumperCommandContainer); + + SyncUProperties(); + + return bResult; +} + void USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) { SyncImplObject(); FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{ - ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()}; + ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get() + }; SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer); SyncUProperties(); @@ -723,7 +761,8 @@ void USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackComm FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{ - ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()}; + ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get() + }; FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()}; FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()}; SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ThumperCommand( diff --git a/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h b/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h index 00b18d45..da24ff85 100644 --- a/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h +++ b/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h @@ -29,7 +29,8 @@ * * @section DESCRIPTION * - * + * An interface for the Sense Glove exoskeleton glove. + * Contains methods for Kinematics, Haptics and Serialization. */ @@ -56,6 +57,9 @@ class FSGSenseGloveImpl; class USGBuzzCommand; class USGForceFeedbackCommand; +/** + * Interface for the Sense Glove; and exoskeleton Force-Feedback glove. + */ UCLASS(BlueprintType) class SENSEGLOVECORE_API USGSenseGlove final : public USGHapticGlove { @@ -67,56 +71,108 @@ public: static USGSenseGlove* NewSenseGlove(UObject* Outer, TSharedRef SenseGloveImpl); public: + /** + * + */ static USGSenseGlove* NewSenseGlove(UObject* Outer); + /** + * Create a new instance of a Sense Glove. + */ static USGSenseGlove* NewSenseGlove(UObject* Outer, const USGSenseGloveInfo& Model); public: + /** + * Byte indicating a new Sense Glove haptic command. + */ static ANSICHAR GetHapticsByte(); + /** + * Byte indicating a new Thumper command. + */ static ANSICHAR GetThumperByte(); public: + /** + * Calculates a GlovePose based on sensor angles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ static USGSenseGlovePose* CalculateGlovePose(UObject* Outer, const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel); + /** + * Calculates a GlovePose based on gloveAngles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ static USGSenseGlovePose* CalculateGlovePose(UObject* Outer, const TArray>& GloveAngles, const USGSenseGloveInfo* GloveModel); + /** + * @remarks Use this when you already have a GlovePose. + */ static USGHandPose* CalculateHandPose(UObject* Outer, const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile); public: + /** + * Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful. + */ static USGDevice* Parse(UObject* Outer, const FString& ConstantsString); + /** + * Retrieve all Sense Gloves connected to this system. + */ static TArray GetSenseGloves(UObject* Outer); + /** + * Retrieve the first connected Sense Glove there is. + */ static bool GetSenseGlove(UObject* Outer, USGSenseGlove*& OutGlove); + /** + * Retrieve the first (connected) right or left handed sense glove. + */ static bool GetSenseGlove(UObject* Outer, bool bRightHanded, USGSenseGlove*& OutGlove); public: + /** + * Convert a SenseGlove GlovePose into calibrationValues. + */ static TArray GetCalibrationValues(const USGSenseGlovePose* GlovePose); + /** + * Apply interpolation values to the correct fields in the SenseGlove Profile, based on min/max sensor values. + */ static void CalibrateInterpolation(UObject* Outer, const TArray& MinValues, const TArray& MaxValues, bool bRightHanded, USGSenseGloveHandProfile*& OutProfile); public: + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, FVector& OutGlovePosition, FQuat& OutGloveRotation); + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, FVector& OutGlovePosition, FRotator& OutGloveRotation); + /** + * Calculates the full wrist location. + */ static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, @@ -124,6 +180,9 @@ public: const FQuat& GloveWristRotationOffset, FVector& OutWristPosition, FQuat& OutWristRotation); + /** + * Calculates the full wrist location. + */ static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, @@ -143,8 +202,14 @@ private: FImplDeleter PimplDeleter; protected: + /** + * + */ USGSenseGlove(); + /** + * Create a new instance of a Sense Glove. + */ explicit USGSenseGlove(const USGSenseGloveInfo& Model); public: @@ -203,94 +268,203 @@ protected: virtual void SyncUProperties() override; public: + /** + * Retrieve this glove's hardware model, which contains its hardware data. + */ USGSenseGloveInfo* GetGloveModel(UObject* Outer) const; + /** + * Check if this Sense Glove is right handed. + * + * @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used. + */ virtual bool IsRight() const override; public: + /** + * Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration. + */ virtual ESGDeviceType GetDeviceType() const override; + /** + * Retrieve this Sense Glove's unique identifier. + */ virtual FString GetDeviceId() const override; + /** + * Retrieve this glove's hardware (sub) version. + */ virtual FString GetHardwareVersion() const override; + /** + * Retrieve this device's firmware version. + */ virtual int32 GetFirmwareVersion() const override; + /** + * Retrieve this device's sub-firmware version. + */ virtual int32 GetSubFirmwareVersion() const override; public: + /** + * Get the latest Sensor Data from this Sense Glove. + */ bool GetSensorData(UObject* Outer, USGSenseGloveSensorData*& OutSensorData) const; + /** + * + */ virtual bool GetImuRotation(FQuat& OutImu) override; + /** + * + */ virtual bool GetImuRotation(FRotator& OutImu) override; + /** + * Get the pose of this Sense Glove's hardware, based on its latest Sensor Data. + */ bool GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose); + /** + * Get the pose of this Sense Glove's hardware based on a set of Sensor Data. + */ bool GetGlovePose(UObject* Outer, const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose); /// HACK /// 'FSGSenseGloveImpl::GetHandPose' hides overloaded virtual functions [-Werror,-Woverloaded-virtual] - /// tell the compiler we want both the GetHandPose from FSGHapticGloveImpl and FSGSenseGloveImpl + /// tell the compiler we want both the GetHandPose from USGHapticGlove and USGSenseGlove using USGHapticGlove::GetHandPose; + /** + * Retrieve a new hand pose using this glove's data, based on (calibrated) user data. + */ bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile, USGHandPose*& OutHandPose); + /** + * Calculate the Hand Pose of this device, provided it has Hand Tracking available. + */ virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose) override; + /** + * Calculate the HandPose of this Device, taking into account user values, but not hand geometry. + */ virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose) override; public: + /// HACK + /// 'USGSenseGlove::SendHaptics' hides overloaded virtual functions [-Werror,-Woverloaded-virtual] + /// tell the compiler we want both the SendHaptics from USGHapticGlove and USGSenseGlove + using USGHapticGlove::SendHaptics; + + /** + * Set the level(s) of Force and Vibrotactile feedback, with an optional thumper command. + */ + bool SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand, + const USGBuzzCommand* BuzzCommand, + ESGSenseGloveThumperCommand ThumperCommand = ESGSenseGloveThumperCommand::None); + + /** + * Send a thumper command. + */ + bool SendHaptics(ESGSenseGloveThumperCommand ThumperCommand); + + /** + * Send Haptic Commands to this Glove. + */ virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) override; + /** + * Send Haptic Commands to this Glove. + */ virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override; + /** + * Retrieve this device's firmware version. + */ virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand, const USGThumperCommand* ThumperCommand) override; public: + /** + * Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values. + */ virtual bool GetCalibrationValues(TArray& OutValues) override; + /** + * Reset the glove's calibration range. + */ virtual void ResetCalibrationRange() override; + /** + * Apply this glove's calibration range to a handProfile. + */ virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const override; + /** + * Apply this glove's calibration range to a SenseGloveHandProfile. + */ void ApplyCalibration(UObject* Outer, USGSenseGloveHandProfile*& OutProfile) const; public: + /** + * Retrieve the location of the glove origin, based on a reference location. + */ virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + /** + * Retrieve the location of the glove origin, based on a reference location. + */ virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, FVector& OutGlovePosition, FRotator& OutGloveRotation) const override; + /** + * Retrieve the location of the glove origin, based on a reference location. + */ void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, FVector& OutGlovePosition, FQuat& OutGloveRotation) const; + /** + * Retrieve the location of the glove origin, based on a reference location. + */ void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, FVector& OutGlovePosition, FRotator& OutGloveRotation) const; + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FQuat& OutWristRotation) const override; + /** + * + */ virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FRotator& OutWristRotation) const override; + /** + * + */ void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset, FVector& OutWristPosition, FQuat& OutWristRotation) const; + /** + * + */ void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, ESGPositionalTrackingHardware TrackingHardware, const FVector& GloveWristPositionOffset, @@ -298,5 +472,8 @@ public: FVector& OutWristPosition, FRotator& OutWristRotation) const; public: + /** + * + */ virtual FString ToString() const override; -}; \ No newline at end of file +}; diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp index 1c5de128..977b21fe 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp @@ -354,6 +354,70 @@ ESGPositionalTrackingHardware FSGCoreEnumCast::ToESGPositionalTrackingHardware(c return ESGPositionalTrackingHardware::None; } +FSGCoreEnumCast::FESenseGloveThumperCommandType FSGCoreEnumCast::ToESenseGloveThumperCommand( + const ESGSenseGloveThumperCommand Enum) +{ + switch (Enum) + { + case ESGSenseGloveThumperCommand::None: + return FESenseGloveThumperCommandType::None; + case ESGSenseGloveThumperCommand::TurnOff: + return FESenseGloveThumperCommandType::TurnOff; + case ESGSenseGloveThumperCommand::CueGameOver: + return FESenseGloveThumperCommandType::CueGameOver; + case ESGSenseGloveThumperCommand::ButtonDouble100: + return FESenseGloveThumperCommandType::ButtonDouble100; + case ESGSenseGloveThumperCommand::ButtonDouble60: + return FESenseGloveThumperCommandType::ButtonDouble60; + case ESGSenseGloveThumperCommand::ImpactThump30: + return FESenseGloveThumperCommandType::ImpactThump30; + case ESGSenseGloveThumperCommand::ImpactThump10: + return FESenseGloveThumperCommandType::ImpactThump10; + case ESGSenseGloveThumperCommand::ImpactThump100: + return FESenseGloveThumperCommandType::ImpactThump100; + case ESGSenseGloveThumperCommand::ObjectGrasp100: + return FESenseGloveThumperCommandType::ObjectGrasp100; + case ESGSenseGloveThumperCommand::ObjectGrasp60: + return FESenseGloveThumperCommandType::ObjectGrasp60; + case ESGSenseGloveThumperCommand::ObjectGrasp30: + return FESenseGloveThumperCommandType::ObjectGrasp30; + } + + // Keep the compiler satisfied! + return FESenseGloveThumperCommandType::None; +} + +ESGSenseGloveThumperCommand FSGCoreEnumCast::ToESGSenseGloveThumperCommand(const FESenseGloveThumperCommandType Enum) +{ + switch (Enum) + { + case FESenseGloveThumperCommandType::None: + return ESGSenseGloveThumperCommand::None; + case FESenseGloveThumperCommandType::TurnOff: + return ESGSenseGloveThumperCommand::TurnOff; + case FESenseGloveThumperCommandType::CueGameOver: + return ESGSenseGloveThumperCommand::CueGameOver; + case FESenseGloveThumperCommandType::ButtonDouble100: + return ESGSenseGloveThumperCommand::ButtonDouble100; + case FESenseGloveThumperCommandType::ButtonDouble60: + return ESGSenseGloveThumperCommand::ButtonDouble60; + case FESenseGloveThumperCommandType::ImpactThump30: + return ESGSenseGloveThumperCommand::ImpactThump30; + case FESenseGloveThumperCommandType::ImpactThump10: + return ESGSenseGloveThumperCommand::ImpactThump10; + case FESenseGloveThumperCommandType::ImpactThump100: + return ESGSenseGloveThumperCommand::ImpactThump100; + case FESenseGloveThumperCommandType::ObjectGrasp100: + return ESGSenseGloveThumperCommand::ObjectGrasp100; + case FESenseGloveThumperCommandType::ObjectGrasp60: + return ESGSenseGloveThumperCommand::ObjectGrasp60; + case FESenseGloveThumperCommandType::ObjectGrasp30: + return ESGSenseGloveThumperCommand::ObjectGrasp30; + } + + return ESGSenseGloveThumperCommand::None; +} + FSGCoreEnumCast::FEThumbMovementType FSGCoreEnumCast::ToEThumbMovement(const ESGThumbMovement Enum) { switch (Enum) diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h index c8d3ae17..0af88c6c 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h @@ -36,6 +36,7 @@ #pragma once #include +#include #include "SGBuildHacks/SGInclude_Core_Fingers.h" #include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h" @@ -43,6 +44,7 @@ #include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h" #include "SGBuildHacks/SGInclude_Core_SGDevice.h" #include "SGBuildHacks/SGInclude_Core_Tracking.h" +#include "SGCoreImpl/SGHapticGloveCommandBufferImpl.h" #include "SGTypes/SGCoreTypes.h" class SENSEGLOVECOREIMPL_API FSGCoreEnumCast @@ -56,37 +58,41 @@ public: typedef SGCore::Kinematics::EFingerMovement FEFingerMovementType; typedef SGCore::SG::EFingerSolver FEFingerSolverType; typedef SGCore::EPositionalTrackingHardware FEPositionalTrackingHardware; + typedef SGCore::Haptics::ESenseGloveThumperCommand FESenseGloveThumperCommandType; typedef SGCore::Kinematics::EThumbMovement FEThumbMovementType; typedef SGCore::SG::EThumbSolver FEThumbSolverType; public: - static FEBackendType ToEBackendType(const ESGBackendType Enum); - static ESGBackendType ToESGBackendType(const FEBackendType Enum); + static FEBackendType ToEBackendType(ESGBackendType Enum); + static ESGBackendType ToESGBackendType(FEBackendType Enum); - static FECalibrationStageType ToECalibrationStage(const ESGCalibrationStage Enum); - static ESGCalibrationStage ToESGCalibrationStage(const FECalibrationStageType Enum); + static FECalibrationStageType ToECalibrationStage(ESGCalibrationStage Enum); + static ESGCalibrationStage ToESGCalibrationStage(FECalibrationStageType Enum); - static FEConnectionType ToEConnectionType(const ESGConnectionType Enum); - static ESGConnectionType ToESGConnectionType(const FEConnectionType Enum); + static FEConnectionType ToEConnectionType(ESGConnectionType Enum); + static ESGConnectionType ToESGConnectionType(FEConnectionType Enum); - static FEDeviceType ToEDeviceType(const ESGDeviceType Enum); - static ESGDeviceType ToESGDeviceType(const FEDeviceType Enum); + static FEDeviceType ToEDeviceType(ESGDeviceType Enum); + static ESGDeviceType ToESGDeviceType(FEDeviceType Enum); - static FEFingerType ToEFinger(const ESGFinger Enum); - static ESGFinger ToESGFinger(const FEFingerType Enum); + static FEFingerType ToEFinger(ESGFinger Enum); + static ESGFinger ToESGFinger(FEFingerType Enum); - static FEFingerMovementType ToEFingerMovement(const ESGFingerMovement Enum); - static ESGFingerMovement ToESGFingerMovement(const FEFingerMovementType Enum); + static FEFingerMovementType ToEFingerMovement(ESGFingerMovement Enum); + static ESGFingerMovement ToESGFingerMovement(FEFingerMovementType Enum); - static FEFingerSolverType ToEFingerSolver(const ESGFingerSolver Enum); - static ESGFingerSolver ToESGFingerSolver(const FEFingerSolverType Enum); + static FEFingerSolverType ToEFingerSolver(ESGFingerSolver Enum); + static ESGFingerSolver ToESGFingerSolver(FEFingerSolverType Enum); - static FEPositionalTrackingHardware ToEPositionalTrackingHardware(const ESGPositionalTrackingHardware Enum); - static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(const FEPositionalTrackingHardware Enum); + static FEPositionalTrackingHardware ToEPositionalTrackingHardware(ESGPositionalTrackingHardware Enum); + static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(FEPositionalTrackingHardware Enum); - static FEThumbMovementType ToEThumbMovement(const ESGThumbMovement Enum); - static ESGThumbMovement ToESGThumbMovement(const FEThumbMovementType Enum); + static FESenseGloveThumperCommandType ToESenseGloveThumperCommand(ESGSenseGloveThumperCommand Enum); + static ESGSenseGloveThumperCommand ToESGSenseGloveThumperCommand(FESenseGloveThumperCommandType Enum); - static FEThumbSolverType ToEThumbSolver(const ESGThumbSolver Enum); - static ESGThumbSolver ToESGThumbSolver(const FEThumbSolverType Enum); + static FEThumbMovementType ToEThumbMovement(ESGThumbMovement Enum); + static ESGThumbMovement ToESGThumbMovement(FEThumbMovementType Enum); + + static FEThumbSolverType ToEThumbSolver(ESGThumbSolver Enum); + static ESGThumbSolver ToESGThumbSolver(FEThumbSolverType Enum); }; \ No newline at end of file diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp index dc78b3a4..9380a867 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp @@ -5033,6 +5033,26 @@ bool SGCoreImpl_FSGSenseGloveImpl_GetHandPose_HandProfile_OutHandPose( StaticCast(OutHandPose)->HandPoseImpl); } +bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ESenseGloveThumperCommand( + void* Instance, + void* ForceFeedbackCommand, + void* BuzzCommand, + void* ThumperCommand) +{ + return StaticCast(Instance)->Ptr->SendHaptics( + StaticCast(ForceFeedbackCommand)->ForceFeedbackCommandImpl, + StaticCast(BuzzCommand)->BuzzCommandImpl, + StaticCast(ThumperCommand)->Command); +} + +bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ThumperCommand( + void* Instance, + void* ThumperCommand) +{ + return StaticCast(Instance)->Ptr->SendHaptics( + StaticCast(ThumperCommand)->Command); +} + void SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand( void* Instance, void* ForceFeedbackCommand) diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp index 04ccdc5c..3de69355 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp @@ -426,6 +426,20 @@ bool FSGSenseGloveImpl::GetHandPose(const FSGHandProfileImpl& HandProfile, FSGHa return bResult; } +bool FSGSenseGloveImpl::SendHaptics(const FSGForceFeedbackCommandImpl& ForceFeedbackCommand, + const FSGBuzzCommandImpl& BuzzCommand, + ESGSenseGloveThumperCommand ThumperCommand) +{ + return ToSenseGlovePtrChecked()->SendHaptics(ForceFeedbackCommand.ToForceFeedbackCommand(), + BuzzCommand.ToBuzzCommand(), + FSGCoreEnumCast::ToESenseGloveThumperCommand(ThumperCommand)); +} + +bool FSGSenseGloveImpl::SendHaptics(ESGSenseGloveThumperCommand ThumperCommand) +{ + return ToSenseGlovePtrChecked()->SendHaptics(FSGCoreEnumCast::ToESenseGloveThumperCommand(ThumperCommand)); +} + void FSGSenseGloveImpl::SendHaptics(const FSGForceFeedbackCommandImpl& ForceFeedbackCommand) { ToSenseGlovePtrChecked()->SendHaptics(ForceFeedbackCommand.ToForceFeedbackCommand()); diff --git a/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h b/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h index 093d7ecb..b5c4357b 100644 --- a/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h +++ b/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h @@ -2522,6 +2522,17 @@ SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetHandPose_Hand void* HandProfile, void* OutHandPose); +SENSEGLOVECOREIMPL_PUBLIC_API bool +SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ESenseGloveThumperCommand( + void* Instance, + void* ForceFeedbackCommand, + void* BuzzCommand, + void* ThumperCommand); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ThumperCommand( + void* Instance, + void* ThumperCommand); + SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand( void* Instance, void* ForceFeedbackCommand); @@ -3236,7 +3247,8 @@ SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_BaseC float DurationSeconds, float StartTimeSeconds); -SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_BaseCommand_DurationSeconds_StartTimeSeconds_MakeShared( +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_BaseCommand_DurationSeconds_StartTimeSeconds_MakeShared( void* OutSharedPtr, void* BaseCommand, float DurationSeconds, diff --git a/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h b/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h index 2ef00685..5e7986f2 100644 --- a/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h +++ b/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h @@ -236,6 +236,17 @@ public: virtual bool GetHandPose(const FSGHandProfileImpl& HandProfile, FSGHandPoseImpl& OutHandPose) override; public: + /// HACK + /// 'FSGSenseGloveImpl::SendHaptics' hides overloaded virtual functions [-Werror,-Woverloaded-virtual] + /// tell the compiler we want both the SendHaptics from FSGHapticGloveImpl and FSGSenseGloveImpl + using FSGHapticGloveImpl::SendHaptics; + + bool SendHaptics(const FSGForceFeedbackCommandImpl& ForceFeedbackCommand, + const FSGBuzzCommandImpl& BuzzCommand, + ESGSenseGloveThumperCommand ThumperCommand = ESGSenseGloveThumperCommand::None); + + bool SendHaptics(ESGSenseGloveThumperCommand ThumperCommand); + virtual void SendHaptics(const FSGForceFeedbackCommandImpl& ForceFeedbackCommand) override; virtual void SendHaptics(const FSGBuzzCommandImpl& BuzzCommand) override; diff --git a/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp b/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp index 33a1070b..3d5dce9d 100644 --- a/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp +++ b/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp @@ -239,6 +239,19 @@ bool USGSenseGloveKismetLibrary::GetHandPose_HP_OutHP( return SenseGlove->GetHandPose(WorldContextObject, HandProfile, OutHandPose); } +bool USGSenseGloveKismetLibrary::SendHaptics_FFC_BC_ESGSenseGloveThumperCommand_TC( + USGSenseGlove* SenseGlove, + const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand, + ESGSenseGloveThumperCommand ThumperCommand) +{ + return SenseGlove->SendHaptics(ForceFeedbackCommand, BuzzCommand, ThumperCommand); +} + +bool USGSenseGloveKismetLibrary::SendHaptics_TC(USGSenseGlove* SenseGlove, ESGSenseGloveThumperCommand ThumperCommand) +{ + return SenseGlove->SendHaptics(ThumperCommand); +} + void USGSenseGloveKismetLibrary::SendHaptics_FFC(USGSenseGlove* SenseGlove, const USGForceFeedbackCommand* ForceFeedbackCommand) { diff --git a/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h b/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h index 280aac24..1c18e636 100644 --- a/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h +++ b/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h @@ -29,7 +29,8 @@ * * @section DESCRIPTION * - * + * An interface for the Sense Glove exoskeleton glove. + * Contains methods for Kinematics, Haptics and Serialization. */ @@ -50,30 +51,52 @@ class USGDevice; class USGForceFeedbackCommand; class USGSenseGlove; +/** + * Interface for the Sense Glove; and exoskeleton Force-Feedback glove. + */ UCLASS(meta=(ScriptName = "SesneGloveSenseGloveKismetLibrary")) class SENSEGLOVECOREKISMET_API USGSenseGloveKismetLibrary final : public USGBlueprintFunctionLibrary { GENERATED_BODY() public: + /** + * Byte indicating a new Sense Glove haptic command. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") static FString GetHapticsByte(); + /** + * Byte indicating a new Thumper command. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") static FString GetThumperByte(); + /** + * Calculates a GlovePose based on sensor angles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static USGSenseGlovePose* CalculateGlovePose_SD_GM( UObject* WorldContextObject, const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel); + /** + * Calculates a GlovePose based on gloveAngles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static USGSenseGlovePose* CalculateGlovePose_GA_GM( UObject* WorldContextObject, const TArray& GloveAngles, const USGSenseGloveInfo* GloveModel); + /** + * @remarks Use this when you already have a GlovePose. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static USGHandPose* CalculateHandPose( @@ -81,31 +104,52 @@ public: const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile); + /** + * Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static USGDevice* Parse(UObject* WorldContextObject, const FString& ConstantsString); + /** + * Retrieve all Sense Gloves connected to this system. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static TArray GetSenseGloves(UObject* WorldContextObject); + /** + * Retrieve the first connected Sense Glove there is. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Sense Glove", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetSenseGlove_OutG(UObject* WorldContextObject, USGSenseGlove*& OutGlove); + /** + * Retrieve the first (connected) right or left handed sense glove. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Sense Glove", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetSenseGlove_bRH_OutG(UObject* WorldContextObject, bool bRightHanded, USGSenseGlove*& OutGlove); + /** + * Convert a SenseGlove GlovePose into calibrationValues. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Calibration Values", Category="SenseGlove | Core | SG | Sense Glove") static TArray GetCalibrationValues_GlovePose(const USGSenseGlovePose* GlovePose); + /** + * Apply interpolation values to the correct fields in the SenseGlove Profile, based on min/max sensor values. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static void CalibrateInterpolation(UObject* WorldContextObject, const TArray& MinValues, const TArray& MaxValues, bool bRightHanded, USGSenseGloveHandProfile*& OutProfile); + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", Category="SenseGlove | Core | SG | Sense Glove") static void CalculateGloveLocation_RP_FQuat_RR_TH_bRH_MO_OutGP_FQuat_OutGR( @@ -113,6 +157,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, FVector& OutGlovePosition, FQuat& OutGloveRotation); + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", Category="SenseGlove | Core | SG | Sense Glove") static void CalculateGloveLocation_RP_FRotator_RR_TH_bRH_MO_OutGP_FRotator_OutGR( @@ -120,6 +167,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, FVector& OutGlovePosition, FRotator& OutGloveRotation); + /** + * Calculates the full wrist location. + */ UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") static void CalculateWristLocation_RP_FQuat_RR_TH_bRH_MO_GWPOffset_FQuat_GWRO_OutWP_FQuat_OutWR( @@ -128,6 +178,9 @@ public: const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset, FVector& OutWristPosition, FQuat& OutWristRotation); + /** + * Calculates the full wrist location. + */ UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") static void CalculateWristLocation_RP_FRotator_RR_TH_bRH_MO_GWPOffset_FRotator_GWRO_OutWP_FRotator_OutWR( @@ -136,43 +189,81 @@ public: const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset, FVector& OutWristPosition, FRotator& OutWristRotation); + /** + * Retrieve this glove's hardware model, which contains its hardware data. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static USGSenseGloveInfo* GetGloveModel(UObject* WorldContextObject, const USGSenseGlove* SenseGlove); + /** + * Check if this Sense Glove is right handed. + * + * @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static bool IsRight(const USGSenseGlove* SenseGlove); + /** + * Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static ESGDeviceType GetDeviceType(const USGSenseGlove* SenseGlove); + /** + * Retrieve this Sense Glove's unique identifier. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static FString GetDeviceId(const USGSenseGlove* SenseGlove); + /** + * Retrieve this glove's hardware (sub) version. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static FString GetHardwareVersion(const USGSenseGlove* SenseGlove); + /** + * Retrieve this device's firmware version. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static int32 GetFirmwareVersion(const USGSenseGlove* SenseGlove); + /** + * Retrieve this device's sub-firmware version. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static int32 GetSubFirmwareVersion(const USGSenseGlove* SenseGlove); + /** + * Get the latest Sensor Data from this Sense Glove. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetSensorData(UObject* WorldContextObject, const USGSenseGlove* SenseGlove, USGSenseGloveSensorData*& OutSensorData); + /** + * + */ UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove") static bool GetImuRotation_FQuat_OutI(UPARAM(ref) USGSenseGlove* SenseGlove, FQuat& OutImu); + /** + * + */ UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove") static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGSenseGlove* SenseGlove, FRotator& OutImu); + /** + * Get the pose of this Sense Glove's hardware, based on its latest Sensor Data. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetGlovePose_OutGP(UObject* WorldContextObject, UPARAM(ref) USGSenseGlove* SenseGlove, USGSenseGlovePose*& OutGlovePose); + /** + * Get the pose of this Sense Glove's hardware based on a set of Sensor Data. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetGlovePose_SD_OutGP(UObject* WorldContextObject, @@ -180,6 +271,9 @@ public: const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose); + /** + * Retrieve a new hand pose using this glove's data, based on (calibrated) user data. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetHandPose_HM_P_OutHP(UObject* WorldContextObject, @@ -188,6 +282,9 @@ public: const USGSenseGloveHandProfile* Profile, USGHandPose*& OutHandPose); + /** + * Calculate the Hand Pose of this device, provided it has Hand Tracking available. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetHandPose_HG_HP_OutHP(UObject* WorldContextObject, @@ -196,6 +293,9 @@ public: const USGHandProfile* HandProfile, USGHandPose*& OutHandPose); + /** + * Calculate the HandPose of this Device, taking into account user values, but not hand geometry. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static bool GetHandPose_HP_OutHP(UObject* WorldContextObject, @@ -203,13 +303,37 @@ public: const USGHandProfile* HandProfile, USGHandPose*& OutHandPose); + /** + * Set the level(s) of Force and Vibrotactile feedback, with an optional thumper command. + */ + UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove") + static bool SendHaptics_FFC_BC_ESGSenseGloveThumperCommand_TC( + UPARAM(ref) USGSenseGlove* SenseGlove, + const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand, + ESGSenseGloveThumperCommand ThumperCommand = ESGSenseGloveThumperCommand::None); + + /** + * Send a thumper command. + */ + UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove") + static bool SendHaptics_TC(UPARAM(ref) USGSenseGlove* SenseGlove, ESGSenseGloveThumperCommand ThumperCommand); + + /** + * Send Haptic Commands to this Glove. + */ UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove") static void SendHaptics_FFC(UPARAM(ref) USGSenseGlove* SenseGlove, const USGForceFeedbackCommand* ForceFeedbackCommand); + /** + * Send Haptic Commands to this Glove. + */ UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove") static void SendHaptics_BC(UPARAM(ref) USGSenseGlove* SenseGlove, const USGBuzzCommand* BuzzCommand); + /** + * Retrieve this device's firmware version. + */ UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove") static void SendHaptics_FFC_BC_TC( UPARAM(ref) USGSenseGlove* SenseGlove, @@ -217,24 +341,39 @@ public: const USGBuzzCommand* BuzzCommand, const USGThumperCommand* ThumperCommand); + /** + * Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values. + */ UFUNCTION(BlueprintCallable, DisplayName="Get Calibration Values", Category="SenseGlove | Core | SG | Sense Glove") static bool GetCalibrationValues_OutV(UPARAM(ref) USGSenseGlove* SenseGlove, TArray& OutValues); + /** + * Reset the glove's calibration range. + */ UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") static void ResetCalibrationRange(UPARAM(ref) USGSenseGlove* SenseGlove); + /** + * Apply this glove's calibration range to a handProfile. + */ UFUNCTION(BlueprintPure, DisplayName="Apply Calibration", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static void ApplyCalibration_USGHandProfile_OutP(UObject* WorldContextObject, const USGSenseGlove* SenseGlove, USGHandProfile*& OutProfile); + /** + * Apply this glove's calibration range to a SenseGloveHandProfile. + */ UFUNCTION(BlueprintPure, DisplayName="Apply Calibration", Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) static void ApplyCalibration_USGSenseGloveHandProfile_OutP(UObject* WorldContextObject, const USGSenseGlove* SenseGlove, USGSenseGloveHandProfile*& OutProfile); + /** + * Retrieve the location of the glove origin, based on a reference location. + */ UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( const USGSenseGlove* SenseGlove, @@ -242,6 +381,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, FVector& OutGlovePosition, FQuat& OutGloveRotation); + /** + * Retrieve the location of the glove origin, based on a reference location. + */ UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( const USGSenseGlove* SenseGlove, @@ -249,6 +391,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, FVector& OutGlovePosition, FRotator& OutGloveRotation); + /** + * Retrieve the location of the glove origin, based on a reference location. + */ UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetGloveLocation_RP_FQuat_RR_TH_MO_OutGP_FQuat_OutGR( const USGSenseGlove* SenseGlove, @@ -256,6 +401,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, FVector& OutGlovePosition, FQuat& OutGloveRotation); + /** + * Retrieve the location of the glove origin, based on a reference location. + */ UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetGloveLocation_RP_FRotator_RR_TH_MO_OutGP_FRotator_OutGR( const USGSenseGlove* SenseGlove, @@ -263,6 +411,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, FVector& OutGlovePosition, FRotator& OutGloveRotation); + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( const USGSenseGlove* SenseGlove, @@ -270,6 +421,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FQuat& OutWristRotation); + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( const USGSenseGlove* SenseGlove, @@ -277,6 +431,9 @@ public: ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FRotator& OutWristRotation); + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetWristLocation_RP_FQuat_RR_TH_GWPO_FQuat_GWRO_OutWP_FQuat_OutWR( const USGSenseGlove* SenseGlove, @@ -286,6 +443,9 @@ public: const FQuat& GloveWristRotationOffset, FVector& OutWristPosition, FQuat& OutWristRotation); + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") static void GetWristLocation_RP_FRotator_RR_TH_GWPO_FRotator_GWRO_OutWP_FRotator_OutWR( const USGSenseGlove* SenseGlove, @@ -295,6 +455,9 @@ public: const FRotator& GloveWristRotationOffset, FVector& OutWristPosition, FRotator& OutWristRotation); + /** + * Create a string representation of this device for reporting purposes. + */ UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") static FString ToString(const USGSenseGlove* SenseGlove); }; \ No newline at end of file