initial attempt at implementing android calibration

This commit is contained in:
Mamadou Babaei
2023-03-28 10:34:49 +02:00
parent f1b14c7673
commit 1a89f202c5
9 changed files with 89 additions and 6 deletions
@@ -126,6 +126,17 @@ bool USGHapticGloveKismetLibrary::GetHandPose_OutHP(
return HapticGlove->GetHandPose(WorldContextObject, OutHandPose);
}
bool USGHapticGloveKismetLibrary::GetHandPose_OutHTP(
UObject* WorldContextObject, USGHapticGlove* HapticGlove, const float DeltaTime, USGHandPose*& OutHandPose)
{
#if PLATFORM_ANDROID
return HapticGlove->GetHandPose(WorldContextObject, DeltaTime, OutHandPose);
#else /* PLATFORM_ANDROID */
ensureAlwaysMsgf(false, TEXT("This is an Android only method! Do not call it on other platforms!"));
return false;
#endif /* PLATFORM_ANDROID */
}
void USGHapticGloveKismetLibrary::StopHaptics(USGHapticGlove* HapticGlove)
{
return HapticGlove->StopHaptics();
@@ -167,6 +167,17 @@ public:
UPARAM(ref) USGHapticGlove* HapticGlove,
USGHandPose*& OutHandPose);
/**
* [ Android Only! Asserts on other platforms! ]
* Retrieve a HandPose based on the latest profile and default hand Geometry.
*/
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
meta=(WorldContext="WorldContextObject"))
static bool GetHandPose_OutHTP(UObject* WorldContextObject,
UPARAM(ref) USGHapticGlove* HapticGlove,
float DeltaTime,
USGHandPose*& OutHandPose);
/**
* Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when resetting.
*/